Skip to content
Snippets Groups Projects
Unverified Commit 9033f1f3 authored by J. Nick Koston's avatar J. Nick Koston Committed by GitHub
Browse files

Break long lines in powerwall integration (#108002)

parent 659ee519
No related branches found
No related tags found
No related merge requests found
......@@ -203,7 +203,8 @@ async def async_migrate_entity_unique_ids(
for ent_entry in er.async_entries_for_config_entry(ent_reg, entry.entry_id):
current_unique_id = ent_entry.unique_id
if current_unique_id.startswith(old_base_unique_id):
new_unique_id = f"{new_base_unique_id}{current_unique_id.removeprefix(old_base_unique_id)}"
unique_id_postfix = current_unique_id.removeprefix(old_base_unique_id)
new_unique_id = f"{new_base_unique_id}{unique_id_postfix}"
ent_reg.async_update_entity(
ent_entry.entity_id, new_unique_id=new_unique_id
)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment