chore: fix simplification

This commit is contained in:
andig 2024-08-05 18:42:17 +02:00
parent 72fad9c946
commit eb00266ff2

View file

@ -424,12 +424,12 @@ func (c *OCPP) Enabled() (bool, error) {
// fallback to the "offered" measurands
if c.hasMeasurement(types.MeasurandCurrentOffered) {
if v, err := c.getMaxCurrent(); err == nil {
if v, err := c.conn.GetMaxCurrent(); err == nil {
return v > 0, nil
}
}
if c.hasMeasurement(types.MeasurandPowerOffered) {
if v, err := c.getMaxPower(); err == nil {
if v, err := c.conn.GetMaxPower(); err == nil {
return v > 0, nil
}
}