mirror of
https://github.com/home-assistant/core.git
synced 2025-07-26 06:37:52 +00:00
Migrate sensibo to use async_update_entry to alter config entries (#110390)
This commit is contained in:
parent
5f03b5ad41
commit
300f5670e0
@ -47,12 +47,11 @@ async def async_migrate_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
|
|||||||
except (AuthenticationError, ConnectionError, NoDevicesError, NoUsernameError):
|
except (AuthenticationError, ConnectionError, NoDevicesError, NoUsernameError):
|
||||||
return False
|
return False
|
||||||
|
|
||||||
entry.version = 2
|
|
||||||
|
|
||||||
LOGGER.debug("Migrate Sensibo config entry unique id to %s", new_unique_id)
|
LOGGER.debug("Migrate Sensibo config entry unique id to %s", new_unique_id)
|
||||||
hass.config_entries.async_update_entry(
|
hass.config_entries.async_update_entry(
|
||||||
entry,
|
entry,
|
||||||
unique_id=new_unique_id,
|
unique_id=new_unique_id,
|
||||||
|
version=2,
|
||||||
)
|
)
|
||||||
|
|
||||||
return True
|
return True
|
||||||
|
Loading…
x
Reference in New Issue
Block a user