Skip to content

Commit

Permalink
fix night mode
Browse files Browse the repository at this point in the history
  • Loading branch information
benleb committed Apr 4, 2021
1 parent b9565d7 commit 35f76a3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions apps/automoli/automoli.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
)

Expand Down Expand Up @@ -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]}() "
Expand Down

0 comments on commit 35f76a3

Please sign in to comment.