From 54f009adcdc194c28c50f0682948da450a333b8b Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Sat, 13 Jan 2024 17:03:42 -1000 Subject: [PATCH] Break long lines in powerwall integration --- homeassistant/components/powerwall/__init__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/homeassistant/components/powerwall/__init__.py b/homeassistant/components/powerwall/__init__.py index 5cccd54a32aab2..29e890e60278b6 100644 --- a/homeassistant/components/powerwall/__init__.py +++ b/homeassistant/components/powerwall/__init__.py @@ -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 )