mirror of
https://github.com/home-assistant/core.git
synced 2025-04-26 02:07:54 +00:00
Skip Huawei LTE device registry setup with no identifiers or connections (#50261)
Closes https://github.com/home-assistant/core/issues/50182
This commit is contained in:
parent
fca56993c6
commit
3fab21ebc7
@ -393,6 +393,7 @@ async def async_setup_entry(hass: HomeAssistant, config_entry: ConfigEntry) -> b
|
|||||||
router.subscriptions.clear()
|
router.subscriptions.clear()
|
||||||
|
|
||||||
# Set up device registry
|
# Set up device registry
|
||||||
|
if router.device_identifiers or router.device_connections:
|
||||||
device_data = {}
|
device_data = {}
|
||||||
sw_version = None
|
sw_version = None
|
||||||
if router.data.get(KEY_DEVICE_INFORMATION):
|
if router.data.get(KEY_DEVICE_INFORMATION):
|
||||||
@ -401,7 +402,9 @@ async def async_setup_entry(hass: HomeAssistant, config_entry: ConfigEntry) -> b
|
|||||||
if device_info.get("DeviceName"):
|
if device_info.get("DeviceName"):
|
||||||
device_data["model"] = device_info["DeviceName"]
|
device_data["model"] = device_info["DeviceName"]
|
||||||
if not sw_version and router.data.get(KEY_DEVICE_BASIC_INFORMATION):
|
if not sw_version and router.data.get(KEY_DEVICE_BASIC_INFORMATION):
|
||||||
sw_version = router.data[KEY_DEVICE_BASIC_INFORMATION].get("SoftwareVersion")
|
sw_version = router.data[KEY_DEVICE_BASIC_INFORMATION].get(
|
||||||
|
"SoftwareVersion"
|
||||||
|
)
|
||||||
if sw_version:
|
if sw_version:
|
||||||
device_data["sw_version"] = sw_version
|
device_data["sw_version"] = sw_version
|
||||||
device_registry = await dr.async_get_registry(hass)
|
device_registry = await dr.async_get_registry(hass)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user