Migrate recollect_waste to use async_update_entry to alter config entries (#110378)

pull/110390/head
J. Nick Koston 2024-02-12 11:41:06 -06:00 committed by GitHub
parent 925e9eecce
commit 542e306b0c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 1 deletions

View File

@ -92,7 +92,8 @@ async def async_migrate_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
# 1 -> 2: Update unique ID of existing, single sensor entity to be consistent with
# common format for platforms going forward:
if version == 1:
version = entry.version = 2
version = 2
hass.config_entries.async_update_entry(entry, version=version)
@callback
def migrate_unique_id(entity_entry: er.RegistryEntry) -> dict[str, Any]: