From 6da38d67fff31eef36af54a5f235e4b1bd375737 Mon Sep 17 00:00:00 2001 From: epenet <6771947+epenet@users.noreply.github.com> Date: Tue, 8 Mar 2022 08:54:03 +0100 Subject: [PATCH] Simplify SSDP discovery in SamsungTV (#67843) Co-authored-by: epenet --- homeassistant/components/samsungtv/config_flow.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/homeassistant/components/samsungtv/config_flow.py b/homeassistant/components/samsungtv/config_flow.py index 13697c39633..a5d932cc32c 100644 --- a/homeassistant/components/samsungtv/config_flow.py +++ b/homeassistant/components/samsungtv/config_flow.py @@ -285,10 +285,11 @@ class SamsungTVConfigFlow(config_entries.ConfigFlow, domain=DOMAIN): self._host = hostname self._manufacturer = discovery_info.upnp[ssdp.ATTR_UPNP_MANUFACTURER] self._abort_if_manufacturer_is_not_samsung() - if not await self._async_get_and_check_device_info(): - # If we cannot get device info for an SSDP discovery - # its likely a legacy tv. - self._name = self._title = self._model = model_name + + # Set defaults, in case they cannot be extracted from device_info + self._name = self._title = self._model = model_name + # Update from device_info (if accessible) + await self._async_get_and_check_device_info() # The UDN provided by the ssdp discovery doesn't always match the UDN # from the device_info, used by the the other methods so we need to