dsmr: migrate hourly_gas_meter_reading to mbus device (#123149)

This commit is contained in:
dupondje 2024-08-05 10:32:58 +02:00 committed by GitHub
parent b45fe0ec73
commit a7fbac5185
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 103 additions and 1 deletions

View file

@ -439,7 +439,9 @@ def rename_old_gas_to_mbus(
entries = er.async_entries_for_device(ent_reg, device_id)
for entity in entries:
if entity.unique_id.endswith("belgium_5min_gas_meter_reading"):
if entity.unique_id.endswith(
"belgium_5min_gas_meter_reading"
) or entity.unique_id.endswith("hourly_gas_meter_reading"):
try:
ent_reg.async_update_entity(
entity.entity_id,