Files
ha_xiaomi_home/custom_components/xiaomi_home
Necroneco 48b0248892
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
fix: use a valid entity_id with the platform domain (#1777)
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>
2026-09-23 15:48:13 +08:00
..
2024-12-10 17:36:32 +08:00
2025-11-11 08:56:33 +08:00
2025-07-30 15:13:04 +08:00
2024-12-10 17:36:32 +08:00