Skip to content

Commit

Permalink
Update unique_id migration
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexxIT committed Mar 25, 2024
1 parent 71598df commit 02c21cd
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions custom_components/xiaomi_gateway3/hass/hass_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,10 @@ def check_entity_unique_id(registry_entry: RegistryEntry) -> str | None:
# spaces in attr was by mistake
attr = attr.replace(" ", "_")
has_update = True
elif attr == "pressure_state":
attr = "pressure"
elif attr == "occupancy_distance":
attr = "distance"

return f"{uid}_{attr}" if has_update else None

Expand Down

0 comments on commit 02c21cd

Please sign in to comment.