Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
182a46cf92 | ||
|
|
e5c10104b8 |
@@ -603,6 +603,11 @@ class MotionLightCoordinator(DataUpdateCoordinator):
|
|||||||
LUX_CHECK_INTERVAL,
|
LUX_CHECK_INTERVAL,
|
||||||
self._check_lux_periodically,
|
self._check_lux_periodically,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
self.async_set_updated_data({
|
||||||
|
"state": self._state,
|
||||||
|
"attributes": self.attributes,
|
||||||
|
})
|
||||||
|
|
||||||
def _stop_lux_check_timer(self):
|
def _stop_lux_check_timer(self):
|
||||||
"""Stop periodic lux check timer."""
|
"""Stop periodic lux check timer."""
|
||||||
@@ -610,7 +615,10 @@ class MotionLightCoordinator(DataUpdateCoordinator):
|
|||||||
self.logger.debug("Stopping lux check timer")
|
self.logger.debug("Stopping lux check timer")
|
||||||
self._lux_check_timer()
|
self._lux_check_timer()
|
||||||
self._lux_check_timer = None
|
self._lux_check_timer = None
|
||||||
|
self.async_set_updated_data({
|
||||||
|
"state": self._state,
|
||||||
|
"attributes": self.attributes,
|
||||||
|
})
|
||||||
@callback
|
@callback
|
||||||
def _check_lux_periodically(self, _=None):
|
def _check_lux_periodically(self, _=None):
|
||||||
"""Check lux periodically."""
|
"""Check lux periodically."""
|
||||||
@@ -795,7 +803,11 @@ class MotionLightCoordinator(DataUpdateCoordinator):
|
|||||||
self._lux_cooldown_active = False
|
self._lux_cooldown_active = False
|
||||||
self._lux_cooldown_timer = None
|
self._lux_cooldown_timer = None
|
||||||
self.logger.info("Lux cooldown expired")
|
self.logger.info("Lux cooldown expired")
|
||||||
|
self.async_set_updated_data({
|
||||||
|
"state": self._state,
|
||||||
|
"attributes": self.attributes,
|
||||||
|
})
|
||||||
|
|
||||||
def _cancel_all_timers(self):
|
def _cancel_all_timers(self):
|
||||||
"""Cancel all timers."""
|
"""Cancel all timers."""
|
||||||
if self._motion_detect_timer:
|
if self._motion_detect_timer:
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"domain": "motion_light",
|
"domain": "motion_light",
|
||||||
"name": "Motion Light",
|
"name": "Motion Light",
|
||||||
"version": "1.0.2",
|
"version": "1.0.4",
|
||||||
"documentation": "https://github.com/sirmrak/motion_light",
|
"documentation": "https://github.com/sirmrak/motion_light",
|
||||||
"issue_tracker": "https://github.com/sirmrak/motion_light/issues",
|
"issue_tracker": "https://github.com/sirmrak/motion_light/issues",
|
||||||
"dependencies": [],
|
"dependencies": [],
|
||||||
|
|||||||
Reference in New Issue
Block a user