Add support to entity registry for overriding device_class (#59985)
This commit is contained in:
parent
67e13b35db
commit
49a27e12ad
31 changed files with 136 additions and 69 deletions
|
@ -126,7 +126,7 @@ async def handle_v2_migration(hass: core.HomeAssistant, entry: ConfigEntry) -> N
|
|||
continue
|
||||
# migrate sensors
|
||||
matched_dev_class = sensor_class_mapping.get(
|
||||
ent.device_class or "unknown"
|
||||
ent.original_device_class or "unknown"
|
||||
)
|
||||
if matched_dev_class is None:
|
||||
# this may happen if we're looking at orphaned or unsupported entity
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue