From aeb49eb2537216bbc9633eeedac4a8adb85a55a2 Mon Sep 17 00:00:00 2001 From: Michael Graf Date: Thu, 3 Jun 2021 11:06:53 +0200 Subject: [PATCH] Fixing schedule switch #6 --- switch.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/switch.py b/switch.py index 292d503..b463cb6 100644 --- a/switch.py +++ b/switch.py @@ -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):