mirror of
https://github.com/home-assistant/core.git
synced 2025-08-06 12:08:19 +00:00
Move logging
This commit is contained in:
parent
f34e3f1d1b
commit
7b690b4ae7
@ -173,12 +173,6 @@ async def async_migrate_entry(hass: HomeAssistant, entry: ScrapeConfigEntry) ->
|
|||||||
sensor_advanced_key
|
sensor_advanced_key
|
||||||
)
|
)
|
||||||
|
|
||||||
_LOGGER.debug(
|
|
||||||
"Migrating sensor %s with unique id %s to sub config entry data %s",
|
|
||||||
title,
|
|
||||||
old_unique_id,
|
|
||||||
sensor_config,
|
|
||||||
)
|
|
||||||
await asyncio.sleep(0.1) # Ensure different subentry IDs
|
await asyncio.sleep(0.1) # Ensure different subentry IDs
|
||||||
new_sub_entry = ConfigSubentry(
|
new_sub_entry = ConfigSubentry(
|
||||||
data=MappingProxyType(sensor_config),
|
data=MappingProxyType(sensor_config),
|
||||||
@ -186,6 +180,13 @@ async def async_migrate_entry(hass: HomeAssistant, entry: ScrapeConfigEntry) ->
|
|||||||
title=title,
|
title=title,
|
||||||
unique_id=None,
|
unique_id=None,
|
||||||
)
|
)
|
||||||
|
_LOGGER.debug(
|
||||||
|
"Migrating sensor %s with unique id %s to sub config entry id %s, data %s",
|
||||||
|
title,
|
||||||
|
old_unique_id,
|
||||||
|
new_sub_entry.subentry_id,
|
||||||
|
sensor_config,
|
||||||
|
)
|
||||||
old_to_new_sensor_id[old_unique_id] = new_sub_entry.subentry_id
|
old_to_new_sensor_id[old_unique_id] = new_sub_entry.subentry_id
|
||||||
hass.config_entries.async_add_subentry(entry, new_sub_entry)
|
hass.config_entries.async_add_subentry(entry, new_sub_entry)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user