From 0cf228d5a1a8d73489607173497fdf7f8847b405 Mon Sep 17 00:00:00 2001 From: epenet <6771947+epenet@users.noreply.github.com> Date: Wed, 1 Dec 2021 21:46:55 +0100 Subject: [PATCH] Use dataclass properties in hyperion (#60792) --- homeassistant/components/hyperion/config_flow.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/homeassistant/components/hyperion/config_flow.py b/homeassistant/components/hyperion/config_flow.py index 3b5785dd533..4d6253cb161 100644 --- a/homeassistant/components/hyperion/config_flow.py +++ b/homeassistant/components/hyperion/config_flow.py @@ -198,14 +198,14 @@ class HyperionConfigFlow(ConfigFlow, domain=DOMAIN): try: self._data[CONF_PORT] = int( - discovery_info.get("ports", {}).get( + discovery_info.upnp.get("ports", {}).get( "jsonServer", const.DEFAULT_PORT_JSON ) ) except ValueError: self._data[CONF_PORT] = const.DEFAULT_PORT_JSON - if not (hyperion_id := discovery_info.get(ssdp.ATTR_UPNP_SERIAL)): + if not (hyperion_id := discovery_info.upnp.get(ssdp.ATTR_UPNP_SERIAL)): return self.async_abort(reason="no_id") # For discovery mechanisms, we set the unique_id as early as possible to