From ba1cc00c2416dcffe05932c1b7d1775c73f6163c Mon Sep 17 00:00:00 2001 From: epenet <6771947+epenet@users.noreply.github.com> Date: Tue, 30 Nov 2021 11:00:54 +0100 Subject: [PATCH] Use dataclass properties in shelly discovery (#60593) Co-authored-by: epenet --- homeassistant/components/shelly/config_flow.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/homeassistant/components/shelly/config_flow.py b/homeassistant/components/shelly/config_flow.py index ee24a302923..521fca79dc9 100644 --- a/homeassistant/components/shelly/config_flow.py +++ b/homeassistant/components/shelly/config_flow.py @@ -189,7 +189,7 @@ class ConfigFlow(config_entries.ConfigFlow, domain=DOMAIN): self, discovery_info: zeroconf.ZeroconfServiceInfo ) -> FlowResult: """Handle zeroconf discovery.""" - host = discovery_info[zeroconf.ATTR_HOST] + host = discovery_info.host try: self.info = await self._async_get_info(host) except HTTP_CONNECT_ERRORS: