Move dispatcher out of init. (#6355)
This commit is contained in:
parent
8743f23f13
commit
50887e7e2c
3 changed files with 14 additions and 5 deletions
|
@ -49,10 +49,13 @@ class EnvisalinkSensor(EnvisalinkDevice, Entity):
|
|||
_LOGGER.debug('Setting up sensor for partition: ' + partition_name)
|
||||
super().__init__(partition_name + ' Keypad', info, controller)
|
||||
|
||||
@asyncio.coroutine
|
||||
def async_added_to_hass(self):
|
||||
"""Register callbacks."""
|
||||
async_dispatcher_connect(
|
||||
hass, SIGNAL_KEYPAD_UPDATE, self._update_callback)
|
||||
self.hass, SIGNAL_KEYPAD_UPDATE, self._update_callback)
|
||||
async_dispatcher_connect(
|
||||
hass, SIGNAL_PARTITION_UPDATE, self._update_callback)
|
||||
self.hass, SIGNAL_PARTITION_UPDATE, self._update_callback)
|
||||
|
||||
@property
|
||||
def icon(self):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue