mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 03:07:37 +00:00
parent
cb1bfe6ebe
commit
613728ad3b
@ -150,6 +150,10 @@ async def async_setup_entry(
|
|||||||
|
|
||||||
if host.api.new_devices and config_entry.state == ConfigEntryState.LOADED:
|
if host.api.new_devices and config_entry.state == ConfigEntryState.LOADED:
|
||||||
# Their are new cameras/chimes connected, reload to add them.
|
# Their are new cameras/chimes connected, reload to add them.
|
||||||
|
_LOGGER.debug(
|
||||||
|
"Reloading Reolink %s to add new device (capabilities)",
|
||||||
|
host.api.nvr_name,
|
||||||
|
)
|
||||||
hass.async_create_task(
|
hass.async_create_task(
|
||||||
hass.config_entries.async_reload(config_entry.entry_id)
|
hass.config_entries.async_reload(config_entry.entry_id)
|
||||||
)
|
)
|
||||||
|
@ -194,6 +194,13 @@ class ReolinkFlowHandler(ConfigFlow, domain=DOMAIN):
|
|||||||
)
|
)
|
||||||
raise AbortFlow("already_configured")
|
raise AbortFlow("already_configured")
|
||||||
|
|
||||||
|
if existing_entry and existing_entry.data[CONF_HOST] != discovery_info.ip:
|
||||||
|
_LOGGER.debug(
|
||||||
|
"Reolink DHCP reported new IP '%s', updating from old IP '%s'",
|
||||||
|
discovery_info.ip,
|
||||||
|
existing_entry.data[CONF_HOST],
|
||||||
|
)
|
||||||
|
|
||||||
self._abort_if_unique_id_configured(updates={CONF_HOST: discovery_info.ip})
|
self._abort_if_unique_id_configured(updates={CONF_HOST: discovery_info.ip})
|
||||||
|
|
||||||
self.context["title_placeholders"] = {
|
self.context["title_placeholders"] = {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user