Fix Dyson async_add_job (#8113)

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

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."""

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."""