Debug async_added_to_hass async_add_job

This commit is contained in:
Tom Harris 2018-02-21 01:18:20 -05:00
parent 12c5651fe4
commit 22cadff91f
5 changed files with 14 additions and 5 deletions

View file

@ -101,5 +101,6 @@ class InsteonPLMBinarySensor(BinarySensorDevice):
"""Register INSTEON update events.""" """Register INSTEON update events."""
_LOGGER.debug('Device %s added. Now registering callback.', _LOGGER.debug('Device %s added. Now registering callback.',
self.address) self.address)
self._insteon_device_state.register_updates( self.hass.async_add_job(
self._insteon_device_state.register_updates,
self.async_binarysensor_update) self.async_binarysensor_update)

View file

@ -142,4 +142,6 @@ class InsteonPLMFan(FanEntity):
"""Register INSTEON update events.""" """Register INSTEON update events."""
_LOGGER.debug('Device %s added. Now registering callback.', _LOGGER.debug('Device %s added. Now registering callback.',
self.address) self.address)
self._insteon_device_state.register_updates(self.async_fan_update) self.hass.async_add_job(
self._insteon_device_state.register_updates,
self.async_fan_update)

View file

@ -116,4 +116,6 @@ class InsteonPLMDimmerDevice(Light):
"""Register INSTEON update events.""" """Register INSTEON update events."""
_LOGGER.debug('Device %s added. Now registering callback.', _LOGGER.debug('Device %s added. Now registering callback.',
self.address) self.address)
self._insteon_device_state.register_updates(self.async_light_update) self.hass.async_add_job(
self._insteon_device_state.register_updates,
self.async_light_update)

View file

@ -88,4 +88,6 @@ class InsteonPLMSensorDevice(Entity):
"""Register INSTEON update events.""" """Register INSTEON update events."""
_LOGGER.debug('Device %s added. Now registering callback.', _LOGGER.debug('Device %s added. Now registering callback.',
self.address) self.address)
self._insteon_device_state.register_updates(self.async_sensor_update) self.hass.async_add_job(
self._insteon_device_state.register_updates,
self.async_sensor_update)

View file

@ -167,4 +167,6 @@ class InsteonPLMOpenClosedDevice(SwitchDevice):
"""Register INSTEON update events.""" """Register INSTEON update events."""
_LOGGER.debug('Device %s added. Now registering callback.', _LOGGER.debug('Device %s added. Now registering callback.',
self.address) self.address)
self._insteon_device_state.register_updates(self.async_relay_update) self.hass.async_add_job(
self._insteon_device_state.register_updates,
self.async_relay_update)