Fixing schedule switch #6

This commit is contained in:
Michael Graf 2021-06-03 11:06:53 +02:00
parent 8a9eff2bb1
commit aeb49eb253

View File

@ -70,11 +70,7 @@ class VorwerkScheduleSwitch(CoordinatorEntity, ToggleEntity):
@property
def is_on(self):
"""Return true if switch is on."""
if self._state.available:
if self._state.schedule_enabled:
return STATE_ON
else:
return STATE_OFF
return bool(self._state.schedule_enabled)
@property
def device_info(self):