forked from home-assistant/core
Migrate obihai to use async_update_entry to alter config entries (#110368)
This commit is contained in:
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user