parent
5119005a8d
commit
6bd70fdf15
|
@ -386,4 +386,3 @@ async def async_reset_platform(hass: HomeAssistant, integration_name: str) -> No
|
|||
hubs = hass.data[DOMAIN]
|
||||
for name in hubs:
|
||||
await hubs[name].async_close()
|
||||
del hass.data[DOMAIN]
|
||||
|
|
|
@ -132,6 +132,12 @@ async def async_modbus_setup(
|
|||
|
||||
await async_setup_reload_service(hass, DOMAIN, [DOMAIN])
|
||||
|
||||
if DOMAIN in hass.data and config[DOMAIN] == []:
|
||||
hubs = hass.data[DOMAIN]
|
||||
for name in hubs:
|
||||
if not await hubs[name].async_setup():
|
||||
return False
|
||||
|
||||
hass.data[DOMAIN] = hub_collect = {}
|
||||
for conf_hub in config[DOMAIN]:
|
||||
my_hub = ModbusHub(hass, conf_hub)
|
||||
|
|
Loading…
Reference in New Issue