mirror of
https://github.com/home-assistant/core.git
synced 2025-07-25 22:27:07 +00:00
Change from host to ip in zeroconf discovery for slide_local (#134709)
This commit is contained in:
parent
65d8d071dd
commit
0d3872a4c7
@ -184,14 +184,15 @@ class SlideConfigFlow(ConfigFlow, domain=DOMAIN):
|
|||||||
|
|
||||||
await self.async_set_unique_id(self._mac)
|
await self.async_set_unique_id(self._mac)
|
||||||
|
|
||||||
self._abort_if_unique_id_configured(
|
ip = str(discovery_info.ip_address)
|
||||||
{CONF_HOST: discovery_info.host}, reload_on_update=True
|
_LOGGER.debug("Slide device discovered, ip %s", ip)
|
||||||
)
|
|
||||||
|
self._abort_if_unique_id_configured({CONF_HOST: ip}, reload_on_update=True)
|
||||||
|
|
||||||
errors = {}
|
errors = {}
|
||||||
if errors := await self.async_test_connection(
|
if errors := await self.async_test_connection(
|
||||||
{
|
{
|
||||||
CONF_HOST: self._host,
|
CONF_HOST: ip,
|
||||||
}
|
}
|
||||||
):
|
):
|
||||||
return self.async_abort(
|
return self.async_abort(
|
||||||
@ -201,7 +202,7 @@ class SlideConfigFlow(ConfigFlow, domain=DOMAIN):
|
|||||||
},
|
},
|
||||||
)
|
)
|
||||||
|
|
||||||
self._host = discovery_info.host
|
self._host = ip
|
||||||
|
|
||||||
return await self.async_step_zeroconf_confirm()
|
return await self.async_step_zeroconf_confirm()
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user