Register Z-Wave services on integration setup (#119924)
This commit is contained in:
parent
fe8805de6d
commit
b419ca2241
1 changed files with 6 additions and 5 deletions
|
@ -142,6 +142,12 @@ async def async_setup(hass: HomeAssistant, config: ConfigType) -> bool:
|
||||||
hass.config_entries.async_update_entry(
|
hass.config_entries.async_update_entry(
|
||||||
entry, unique_id=str(entry.unique_id)
|
entry, unique_id=str(entry.unique_id)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
dev_reg = dr.async_get(hass)
|
||||||
|
ent_reg = er.async_get(hass)
|
||||||
|
services = ZWaveServices(hass, ent_reg, dev_reg)
|
||||||
|
services.async_register()
|
||||||
|
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
|
||||||
|
@ -180,11 +186,6 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
|
||||||
async_delete_issue(hass, DOMAIN, "invalid_server_version")
|
async_delete_issue(hass, DOMAIN, "invalid_server_version")
|
||||||
LOGGER.info("Connected to Zwave JS Server")
|
LOGGER.info("Connected to Zwave JS Server")
|
||||||
|
|
||||||
dev_reg = dr.async_get(hass)
|
|
||||||
ent_reg = er.async_get(hass)
|
|
||||||
services = ZWaveServices(hass, ent_reg, dev_reg)
|
|
||||||
services.async_register()
|
|
||||||
|
|
||||||
# Set up websocket API
|
# Set up websocket API
|
||||||
async_register_api(hass)
|
async_register_api(hass)
|
||||||
entry.runtime_data = {}
|
entry.runtime_data = {}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue