Fix Dyson async_add_job (#8113)

This commit is contained in:
Charles Blonde authored and Pascal Vizeli committed 2017-06-19 23:50:27 +02:00
1 parent 8e34c27b63
commit 473d765bb9
2 files changed
+2 -2

No files matched your search

+1 -1
View File
@@ -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."""
+1 -1
View File
@@ -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."""