Wallbox switch entity state incorrect while discharging (#76530)

Switch entity state incorrect while discharging
This commit is contained in:
simeon-simsoft 2022-08-29 21:07:48 +01:00 committed by GitHub
parent e19e65908a
commit a6c61cf339
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -56,6 +56,7 @@ class WallboxSwitch(WallboxEntity, SwitchEntity):
"""Return the availability of the switch."""
return self.coordinator.data[CHARGER_STATUS_DESCRIPTION_KEY] in {
ChargerStatus.CHARGING,
ChargerStatus.DISCHARGING,
ChargerStatus.PAUSED,
ChargerStatus.SCHEDULED,
}
@ -65,6 +66,7 @@ class WallboxSwitch(WallboxEntity, SwitchEntity):
"""Return the status of pause/resume."""
return self.coordinator.data[CHARGER_STATUS_DESCRIPTION_KEY] in {
ChargerStatus.CHARGING,
ChargerStatus.DISCHARGING,
ChargerStatus.WAITING_FOR_CAR,
ChargerStatus.WAITING,
}