mirror of
https://github.com/XiaoMi/ha_xiaomi_home.git
synced 2026-10-27 16:10:49 +08:00
Some checks failed
Tests / check-rule-format (push) Has been cancelled
Validate / validate-hassfest (push) Has been cancelled
Validate / validate-hacs (push) Has been cancelled
Validate / validate-lint (push) Has been cancelled
Validate / validate-setup (push) Has been cancelled
Home Assistant reports the entity_id set by the integration as invalid when its domain is not the platform domain, or when the object_id contains characters that are not allowed, e.g. a MIoT-Spec-V2 description in Chinese or a description that is empty once slugified. Both are deprecated and stop working in 2027.5.0 and 2027.2.0. Derive the platform domain from the Home Assistant entity base class that each entity mixes in, and slugify the object_id. The unique_id keeps using the integration domain and the raw description, so it stays byte for byte identical for the entities that are already registered. The entity_id of an already registered entity is owned by the entity registry and is not changed either, and a newly registered entity gets the same entity_id as before, since the registry was already slugifying the object_id it was given. Co-authored-by: Claude Opus 5 <noreply@anthropic.com> Co-authored-by: LiShuzhen <SusanPhevos@gmail.com>