From 35f76a355434455f2fa4e35a12915bf1c1a1748e Mon Sep 17 00:00:00 2001 From: Ben Lebherz Date: Sun, 4 Apr 2021 09:04:39 +0200 Subject: [PATCH] fix night mode --- apps/automoli/automoli.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/automoli/automoli.py b/apps/automoli/automoli.py index 04d6009..1019e60 100644 --- a/apps/automoli/automoli.py +++ b/apps/automoli/automoli.py @@ -738,7 +738,7 @@ async def lights_on(self, force: bool = False) -> None: light_setting = ( self.active.get("light_setting") - if not (self.night_mode and await self.get_state(self.night_mode["entity"]) == "off") + if not await self.night_mode_active() else self.night_mode.get("light") ) @@ -825,7 +825,7 @@ async def lights_off(self, kwargs: Dict[str, Any]) -> None: return # cancel scheduled callbacks - await self.clear_handles(deepcopy(self.handles)) + await self.clear_handles() self.lg( f"{stack()[0][3]}() "