2021-04-13 00:18:38 +00:00
|
|
|
"""Helpers to check recorder."""
|
|
|
|
|
|
|
|
|
|
|
|
from homeassistant.core import HomeAssistant
|
|
|
|
|
|
|
|
|
2021-11-05 09:40:56 +00:00
|
|
|
def async_migration_in_progress(hass: HomeAssistant) -> bool:
|
2021-04-13 00:18:38 +00:00
|
|
|
"""Check to see if a recorder migration is in progress."""
|
|
|
|
if "recorder" not in hass.config.components:
|
|
|
|
return False
|
2021-11-05 09:40:56 +00:00
|
|
|
# pylint: disable-next=import-outside-toplevel
|
|
|
|
from homeassistant.components import recorder
|
2021-04-13 00:18:38 +00:00
|
|
|
|
2021-11-05 09:40:56 +00:00
|
|
|
return recorder.util.async_migration_in_progress(hass)
|