From fb622c6cc8cab689aecc2d33336d1229dda35bf9 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Mon, 12 Feb 2024 11:35:17 -0600 Subject: [PATCH] Migrate rainmachine to use async_update_entry to alter config entries (#110377) --- homeassistant/components/rainmachine/__init__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/homeassistant/components/rainmachine/__init__.py b/homeassistant/components/rainmachine/__init__.py index 5c3ff18f71c..730e288df02 100644 --- a/homeassistant/components/rainmachine/__init__.py +++ b/homeassistant/components/rainmachine/__init__.py @@ -507,7 +507,8 @@ async def async_migrate_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool: # 1 -> 2: Update unique IDs to be consistent across platform (including removing # the silly removal of colons in the MAC address that was added originally): 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]: