Prefer huawei_lte SSDP model name over friendly name (#143725)

This commit is contained in:
Ville Skyttä
2025-04-29 20:25:32 +03:00
committed by GitHub
parent ab695f90c7
commit a03884981f

View File

@@ -40,6 +40,7 @@ from homeassistant.core import callback
from homeassistant.helpers.service_info.ssdp import ( from homeassistant.helpers.service_info.ssdp import (
ATTR_UPNP_FRIENDLY_NAME, ATTR_UPNP_FRIENDLY_NAME,
ATTR_UPNP_MANUFACTURER, ATTR_UPNP_MANUFACTURER,
ATTR_UPNP_MODEL_NAME,
ATTR_UPNP_PRESENTATION_URL, ATTR_UPNP_PRESENTATION_URL,
ATTR_UPNP_SERIAL, ATTR_UPNP_SERIAL,
ATTR_UPNP_UDN, ATTR_UPNP_UDN,
@@ -309,8 +310,11 @@ class ConfigFlowHandler(ConfigFlow, domain=DOMAIN):
self.context.update( self.context.update(
{ {
"title_placeholders": { "title_placeholders": {
CONF_NAME: discovery_info.upnp.get(ATTR_UPNP_FRIENDLY_NAME) CONF_NAME: (
or "Huawei LTE" discovery_info.upnp.get(ATTR_UPNP_MODEL_NAME)
or discovery_info.upnp.get(ATTR_UPNP_FRIENDLY_NAME)
or "Huawei LTE"
)
} }
} }
) )