mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 19:27:45 +00:00
Duotecno beta fix (#97325)
* Fix duotecno * Implement comments * small cover fix
This commit is contained in:
parent
2542c5f259
commit
374255ce87
@ -22,10 +22,10 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
|
|||||||
await controller.connect(
|
await controller.connect(
|
||||||
entry.data[CONF_HOST], entry.data[CONF_PORT], entry.data[CONF_PASSWORD]
|
entry.data[CONF_HOST], entry.data[CONF_PORT], entry.data[CONF_PASSWORD]
|
||||||
)
|
)
|
||||||
await hass.config_entries.async_forward_entry_setups(entry, PLATFORMS)
|
|
||||||
except (OSError, InvalidPassword, LoadFailure) as err:
|
except (OSError, InvalidPassword, LoadFailure) as err:
|
||||||
raise ConfigEntryNotReady from err
|
raise ConfigEntryNotReady from err
|
||||||
hass.data.setdefault(DOMAIN, {})[entry.entry_id] = controller
|
hass.data.setdefault(DOMAIN, {})[entry.entry_id] = controller
|
||||||
|
await hass.config_entries.async_forward_entry_setups(entry, PLATFORMS)
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
|
||||||
|
@ -26,7 +26,7 @@ async def async_setup_entry(
|
|||||||
"""Set up the duoswitch endities."""
|
"""Set up the duoswitch endities."""
|
||||||
cntrl = hass.data[DOMAIN][entry.entry_id]
|
cntrl = hass.data[DOMAIN][entry.entry_id]
|
||||||
async_add_entities(
|
async_add_entities(
|
||||||
DuotecnoCover(channel) for channel in cntrl.get_units("DuoSwitchUnit")
|
DuotecnoCover(channel) for channel in cntrl.get_units("DuoswitchUnit")
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user