From 64afe738cccabd8473ec8a54adddeb6c186772e9 Mon Sep 17 00:00:00 2001 From: epenet <6771947+epenet@users.noreply.github.com> Date: Tue, 30 Nov 2021 08:53:03 +0100 Subject: [PATCH] Use dataclass properties in elgato discovery (#60588) Co-authored-by: epenet --- homeassistant/components/elgato/config_flow.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/homeassistant/components/elgato/config_flow.py b/homeassistant/components/elgato/config_flow.py index 327aeead4dc..12d1b5d1d93 100644 --- a/homeassistant/components/elgato/config_flow.py +++ b/homeassistant/components/elgato/config_flow.py @@ -46,8 +46,8 @@ class ElgatoFlowHandler(ConfigFlow, domain=DOMAIN): self, discovery_info: zeroconf.ZeroconfServiceInfo ) -> FlowResult: """Handle zeroconf discovery.""" - self.host = discovery_info[zeroconf.ATTR_HOST] - self.port = discovery_info[zeroconf.ATTR_PORT] or 9123 + self.host = discovery_info.host + self.port = discovery_info.port or 9123 try: await self._get_elgato_serial_number()