mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 11:17:21 +00:00
Fix Dyson async_add_job (#8113)
This commit is contained in:
parent
8e34c27b63
commit
473d765bb9
@ -75,7 +75,7 @@ class DysonPureCoolLinkDevice(FanEntity):
|
|||||||
def async_added_to_hass(self):
|
def async_added_to_hass(self):
|
||||||
"""Callback when entity is added to hass."""
|
"""Callback when entity is added to hass."""
|
||||||
self.hass.async_add_job(
|
self.hass.async_add_job(
|
||||||
self._device.add_message_listener(self.on_message))
|
self._device.add_message_listener, self.on_message)
|
||||||
|
|
||||||
def on_message(self, message):
|
def on_message(self, message):
|
||||||
"""Called when new messages received from the fan."""
|
"""Called when new messages received from the fan."""
|
||||||
|
@ -38,7 +38,7 @@ class DysonFilterLifeSensor(Entity):
|
|||||||
def async_added_to_hass(self):
|
def async_added_to_hass(self):
|
||||||
"""Callback when entity is added to hass."""
|
"""Callback when entity is added to hass."""
|
||||||
self.hass.async_add_job(
|
self.hass.async_add_job(
|
||||||
self._device.add_message_listener(self.on_message))
|
self._device.add_message_listener, self.on_message)
|
||||||
|
|
||||||
def on_message(self, message):
|
def on_message(self, message):
|
||||||
"""Called when new messages received from the fan."""
|
"""Called when new messages received from the fan."""
|
||||||
|
Loading…
x
Reference in New Issue
Block a user