Use ZeroconfServiceInfo in nam (#60044)

This commit is contained in:
epenet 2021-11-21 10:25:34 +01:00 committed by GitHub
parent f606ba3b23
commit ba93a384a7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

View file

@ -126,7 +126,7 @@ class NAMFlowHandler(config_entries.ConfigFlow, domain=DOMAIN):
self, discovery_info: zeroconf.ZeroconfServiceInfo
) -> FlowResult:
"""Handle zeroconf discovery."""
self.host = discovery_info[CONF_HOST]
self.host = discovery_info[zeroconf.ATTR_HOST]
self.context["title_placeholders"] = {"host": self.host}
# Do not probe the device if the host is already configured