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

View File

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