mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 11:17:21 +00:00
Fix Non-thread-safe operation in homekit light events (#62147)
This commit is contained in:
parent
c710958261
commit
8bf58df624
@ -120,10 +120,11 @@ class Light(HomeAccessory):
|
|||||||
if self._event_timer:
|
if self._event_timer:
|
||||||
self._event_timer()
|
self._event_timer()
|
||||||
self._event_timer = async_call_later(
|
self._event_timer = async_call_later(
|
||||||
self.hass, CHANGE_COALESCE_TIME_WINDOW, self._send_events
|
self.hass, CHANGE_COALESCE_TIME_WINDOW, self._async_send_events
|
||||||
)
|
)
|
||||||
|
|
||||||
def _send_events(self, *_):
|
@callback
|
||||||
|
def _async_send_events(self, *_):
|
||||||
"""Process all changes at once."""
|
"""Process all changes at once."""
|
||||||
_LOGGER.debug("Coalesced _set_chars: %s", self._pending_events)
|
_LOGGER.debug("Coalesced _set_chars: %s", self._pending_events)
|
||||||
char_values = self._pending_events
|
char_values = self._pending_events
|
||||||
|
Loading…
x
Reference in New Issue
Block a user