mirror of
https://github.com/home-assistant/core.git
synced 2025-04-28 03:07:50 +00:00
parent
48189dd152
commit
16e0953f26
@ -191,8 +191,7 @@ def setup(hass, config):
|
||||
return
|
||||
|
||||
_LOGGER.debug('Discovered unique device %s', hkid)
|
||||
device = HKDevice(hass, host, port, model, hkid, config_num, config)
|
||||
hass.data[KNOWN_DEVICES][hkid] = device
|
||||
HKDevice(hass, host, port, model, hkid, config_num, config)
|
||||
|
||||
hass.data[KNOWN_DEVICES] = {}
|
||||
discovery.listen(hass, SERVICE_HOMEKIT, discovery_dispatch)
|
||||
|
@ -7,7 +7,8 @@ from homeassistant.helpers import discovery
|
||||
from homeassistant.helpers.event import call_later
|
||||
|
||||
from .const import (
|
||||
CONTROLLER, DOMAIN, HOMEKIT_ACCESSORY_DISPATCH, PAIRING_FILE, HOMEKIT_DIR
|
||||
CONTROLLER, DOMAIN, HOMEKIT_ACCESSORY_DISPATCH, KNOWN_DEVICES,
|
||||
PAIRING_FILE, HOMEKIT_DIR
|
||||
)
|
||||
|
||||
|
||||
@ -76,6 +77,8 @@ class HKDevice():
|
||||
|
||||
self.pairing = self.controller.pairings.get(hkid)
|
||||
|
||||
hass.data[KNOWN_DEVICES][hkid] = self
|
||||
|
||||
if self.pairing is not None:
|
||||
self.accessory_setup()
|
||||
else:
|
||||
|
Loading…
x
Reference in New Issue
Block a user