mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 13:17:32 +00:00
Jewish calendar migration bugfix (#141425)
Fix migration of Jewish calendar
This commit is contained in:
parent
840613f43d
commit
e2a3bfca9a
@ -113,8 +113,8 @@ async def async_migrate_entry(
|
|||||||
"first_stars": "tset_hakohavim_tsom",
|
"first_stars": "tset_hakohavim_tsom",
|
||||||
"three_stars": "tset_hakohavim_shabbat",
|
"three_stars": "tset_hakohavim_shabbat",
|
||||||
}
|
}
|
||||||
new_keys = tuple(key_translations.values())
|
old_keys = tuple(key_translations.keys())
|
||||||
if not entity_entry.unique_id.endswith(new_keys):
|
if entity_entry.unique_id.endswith(old_keys):
|
||||||
old_key = entity_entry.unique_id.split("-")[1]
|
old_key = entity_entry.unique_id.split("-")[1]
|
||||||
new_unique_id = f"{config_entry.entry_id}-{key_translations[old_key]}"
|
new_unique_id = f"{config_entry.entry_id}-{key_translations[old_key]}"
|
||||||
return {"new_unique_id": new_unique_id}
|
return {"new_unique_id": new_unique_id}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user