Skip to content

Commit

Permalink
Break long lines in powerwall integration
Browse files Browse the repository at this point in the history
  • Loading branch information
bdraco committed Jan 14, 2024
1 parent e7c25d1 commit 54f009a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion homeassistant/components/powerwall/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
)
Expand Down

0 comments on commit 54f009a

Please sign in to comment.