From 0782c6c4462b027867a9b8edebe17d83db534ff2 Mon Sep 17 00:00:00 2001 From: epenet <6771947+epenet@users.noreply.github.com> Date: Wed, 1 Dec 2021 11:33:40 +0100 Subject: [PATCH] Use dataclass properties in guardian discovery (#60710) Co-authored-by: epenet --- homeassistant/components/guardian/config_flow.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/homeassistant/components/guardian/config_flow.py b/homeassistant/components/guardian/config_flow.py index b02d415b364..ea4589ddd42 100644 --- a/homeassistant/components/guardian/config_flow.py +++ b/homeassistant/components/guardian/config_flow.py @@ -100,7 +100,7 @@ class ConfigFlow(config_entries.ConfigFlow, domain=DOMAIN): async def async_step_dhcp(self, discovery_info: dhcp.DhcpServiceInfo) -> FlowResult: """Handle the configuration via dhcp.""" self.discovery_info = { - CONF_IP_ADDRESS: discovery_info[dhcp.IP_ADDRESS], + CONF_IP_ADDRESS: discovery_info.ip, CONF_PORT: DEFAULT_PORT, } return await self._async_handle_discovery()