Axis component reflect device availability (#22401)

This commit is contained in:
Robert Svensson 2019-03-29 15:20:12 +01:00 committed by GitHub
parent f4625fd561
commit 5f6037d563
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 69 additions and 28 deletions

View file

@ -37,9 +37,9 @@ async def setup_device(hass):
1, axis.DOMAIN, 'Mock Title', ENTRY_CONFIG, 'test',
config_entries.CONN_CLASS_LOCAL_PUSH, options=ENTRY_OPTIONS)
device = axis.AxisNetworkDevice(hass, config_entry)
device.api = AxisDevice(loop=loop, **config_entry.data[axis.CONF_DEVICE],
signal=device.async_signal_callback)
device.api = AxisDevice(loop=loop, **config_entry.data[axis.CONF_DEVICE])
hass.data[axis.DOMAIN] = {device.serial: device}
device.api.enable_events(event_callback=device.async_event_callback)
await hass.config_entries.async_forward_entry_setup(
config_entry, 'camera')