Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Sep 22, 2024
1 parent 908081c commit d81c77a
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions custom_components/adaptive_lighting/switch.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand All @@ -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."""
Expand Down

0 comments on commit d81c77a

Please sign in to comment.