mirror of
https://github.com/home-assistant/core.git
synced 2025-07-22 12:47:08 +00:00
Fix name migration of the Xiaomi Miio humidifier (#53790)
This commit is contained in:
parent
370799bd22
commit
c6a2e247fe
@ -99,7 +99,6 @@ async def async_create_miio_device_and_coordinator(
|
||||
token = entry.data[CONF_TOKEN]
|
||||
name = entry.title
|
||||
device = None
|
||||
migrate_entity_name = None
|
||||
|
||||
if model not in MODELS_HUMIDIFIER:
|
||||
return
|
||||
@ -116,7 +115,7 @@ async def async_create_miio_device_and_coordinator(
|
||||
entity_id = entity_registry.async_get_entity_id("fan", DOMAIN, entry.unique_id)
|
||||
if entity_id:
|
||||
# This check is entities that have a platform migration only and should be removed in the future
|
||||
migrate_entity_name = entity_registry.async_get(entity_id).name
|
||||
if migrate_entity_name := entity_registry.async_get(entity_id).name:
|
||||
hass.config_entries.async_update_entry(entry, title=migrate_entity_name)
|
||||
entity_registry.async_remove(entity_id)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user