mirror of
https://github.com/home-assistant/core.git
synced 2025-07-15 17:27:10 +00:00
Migrate obihai to use async_update_entry to alter config entries (#110368)
This commit is contained in:
parent
2bd64dba6b
commit
fc1c513f33
@ -36,9 +36,9 @@ async def async_migrate_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
|
||||
device_mac = await hass.async_add_executor_job(
|
||||
requester.pyobihai.get_device_mac
|
||||
)
|
||||
hass.config_entries.async_update_entry(entry, unique_id=format_mac(device_mac))
|
||||
|
||||
entry.version = 2
|
||||
hass.config_entries.async_update_entry(
|
||||
entry, unique_id=format_mac(device_mac), version=2
|
||||
)
|
||||
|
||||
LOGGER.info("Migration to version %s successful", entry.version)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user