feat: custom defined MIoT-Spec-V2 instance (#953)

This commit is contained in:
Li Shuzhen
2025-04-05 11:37:17 +08:00
committed by GitHub
parent c6be6be1ec
commit 899d616da4
7 changed files with 645 additions and 491 deletions

View File

@ -156,7 +156,8 @@ async def async_setup_entry(
device.entity_list[platform].remove(entity)
entity_id = device.gen_service_entity_id(
ha_domain=platform,
siid=entity.spec.iid) # type: ignore
siid=entity.spec.iid,
description=entity.spec.description)
if er.async_get(entity_id_or_uuid=entity_id):
er.async_remove(entity_id=entity_id)
if platform in device.prop_list: