Fix Dyson async_add_job (#8113)
This commit is contained in:
1 parent
b74217bec2
commit
cb5fa79835
2 files changed
+2
-2
No files matched your search
@@ -75,7 +75,7 @@ class DysonPureCoolLinkDevice(FanEntity):
|
||||
def async_added_to_hass(self):
|
||||
"""Callback when entity is added to hass."""
|
||||
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):
|
||||
"""Called when new messages received from the fan."""
|
||||
|
||||
@@ -38,7 +38,7 @@ class DysonFilterLifeSensor(Entity):
|
||||
def async_added_to_hass(self):
|
||||
"""Callback when entity is added to hass."""
|
||||
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):
|
||||
"""Called when new messages received from the fan."""
|
||||
|
||||
Reference in new issue
Block a user