Compare commits

...
2 Commits
2 changed files with 15 additions and 3 deletions
+13 -1
View File
@@ -604,13 +604,21 @@ class MotionLightCoordinator(DataUpdateCoordinator):
self._check_lux_periodically,
)
self.async_set_updated_data({
"state": self._state,
"attributes": self.attributes,
})
def _stop_lux_check_timer(self):
"""Stop periodic lux check timer."""
if self._lux_check_timer:
self.logger.debug("Stopping lux check timer")
self._lux_check_timer()
self._lux_check_timer = None
self.async_set_updated_data({
"state": self._state,
"attributes": self.attributes,
})
@callback
def _check_lux_periodically(self, _=None):
"""Check lux periodically."""
@@ -795,6 +803,10 @@ class MotionLightCoordinator(DataUpdateCoordinator):
self._lux_cooldown_active = False
self._lux_cooldown_timer = None
self.logger.info("Lux cooldown expired")
self.async_set_updated_data({
"state": self._state,
"attributes": self.attributes,
})
def _cancel_all_timers(self):
"""Cancel all timers."""
+1 -1
View File
@@ -1,7 +1,7 @@
{
"domain": "motion_light",
"name": "Motion Light",
"version": "1.0.2",
"version": "1.0.4",
"documentation": "https://github.com/sirmrak/motion_light",
"issue_tracker": "https://github.com/sirmrak/motion_light/issues",
"dependencies": [],