From d81c77a940170a0a3783c709f0b41d9fdddde14b Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Sun, 22 Sep 2024 22:31:54 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- custom_components/adaptive_lighting/switch.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/custom_components/adaptive_lighting/switch.py b/custom_components/adaptive_lighting/switch.py index f8301346..ab7405d3 100644 --- a/custom_components/adaptive_lighting/switch.py +++ b/custom_components/adaptive_lighting/switch.py @@ -207,7 +207,8 @@ _DOMAIN_SHORT = "al" # The interval of time between each scene updates -HUE_SCENE_UPDATE_DELAY = 300 # 5 minutes +HUE_SCENE_UPDATE_DELAY = 300 # 5 minutes + def create_context( name: str, @@ -1585,8 +1586,7 @@ async def update_hue_run(self): return timer = self.manager.hue_scene_update_timers.get(self.hue_keyword) - if (timer is not None - and timer.is_running()): + if timer is not None and timer.is_running(): _LOGGER.debug( "%s: Not updating %s because there is throttle, remaining_time:%s", self._name, @@ -2220,7 +2220,6 @@ async def reset(): def start_hue_scene_update_throttle(self, scene: str) -> None: """Set a timer between each scene update call.""" - _LOGGER.debug( "Start throttle timer of %s seconds for scene %s", HUE_SCENE_UPDATE_DELAY, @@ -2234,7 +2233,9 @@ async def reset(): scene, ) - self._handle_timer(scene, self.hue_scene_update_timers, HUE_SCENE_UPDATE_DELAY, reset) + self._handle_timer( + scene, self.hue_scene_update_timers, HUE_SCENE_UPDATE_DELAY, reset + ) def set_auto_reset_manual_control_times(self, lights: list[str], time: float): """Set the time after which the lights are automatically reset."""