mirror of
https://github.com/home-assistant/core.git
synced 2025-05-01 20:57:51 +00:00
parent
48189dd152
commit
16e0953f26
@ -191,8 +191,7 @@ def setup(hass, config):
|
|||||||
return
|
return
|
||||||
|
|
||||||
_LOGGER.debug('Discovered unique device %s', hkid)
|
_LOGGER.debug('Discovered unique device %s', hkid)
|
||||||
device = HKDevice(hass, host, port, model, hkid, config_num, config)
|
HKDevice(hass, host, port, model, hkid, config_num, config)
|
||||||
hass.data[KNOWN_DEVICES][hkid] = device
|
|
||||||
|
|
||||||
hass.data[KNOWN_DEVICES] = {}
|
hass.data[KNOWN_DEVICES] = {}
|
||||||
discovery.listen(hass, SERVICE_HOMEKIT, discovery_dispatch)
|
discovery.listen(hass, SERVICE_HOMEKIT, discovery_dispatch)
|
||||||
|
@ -7,7 +7,8 @@ from homeassistant.helpers import discovery
|
|||||||
from homeassistant.helpers.event import call_later
|
from homeassistant.helpers.event import call_later
|
||||||
|
|
||||||
from .const import (
|
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)
|
self.pairing = self.controller.pairings.get(hkid)
|
||||||
|
|
||||||
|
hass.data[KNOWN_DEVICES][hkid] = self
|
||||||
|
|
||||||
if self.pairing is not None:
|
if self.pairing is not None:
|
||||||
self.accessory_setup()
|
self.accessory_setup()
|
||||||
else:
|
else:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user