mirror of
https://github.com/home-assistant/core.git
synced 2025-07-22 20:57:21 +00:00
Remove ZHA storage file cleanup logic (#111088)
This commit is contained in:
parent
704230e3c1
commit
6bdb3357fa
@ -3,7 +3,6 @@ import asyncio
|
|||||||
import contextlib
|
import contextlib
|
||||||
import copy
|
import copy
|
||||||
import logging
|
import logging
|
||||||
import os
|
|
||||||
import re
|
import re
|
||||||
|
|
||||||
import voluptuous as vol
|
import voluptuous as vol
|
||||||
@ -18,7 +17,6 @@ from homeassistant.exceptions import ConfigEntryError, ConfigEntryNotReady
|
|||||||
from homeassistant.helpers import device_registry as dr
|
from homeassistant.helpers import device_registry as dr
|
||||||
import homeassistant.helpers.config_validation as cv
|
import homeassistant.helpers.config_validation as cv
|
||||||
from homeassistant.helpers.dispatcher import async_dispatcher_send
|
from homeassistant.helpers.dispatcher import async_dispatcher_send
|
||||||
from homeassistant.helpers.storage import STORAGE_DIR
|
|
||||||
from homeassistant.helpers.typing import ConfigType
|
from homeassistant.helpers.typing import ConfigType
|
||||||
|
|
||||||
from . import repairs, websocket_api
|
from . import repairs, websocket_api
|
||||||
@ -129,15 +127,6 @@ async def async_setup_entry(hass: HomeAssistant, config_entry: ConfigEntry) -> b
|
|||||||
custom_quirks_path=zha_data.yaml_config.get(CONF_CUSTOM_QUIRKS_PATH)
|
custom_quirks_path=zha_data.yaml_config.get(CONF_CUSTOM_QUIRKS_PATH)
|
||||||
)
|
)
|
||||||
|
|
||||||
# temporary code to remove the ZHA storage file from disk.
|
|
||||||
# this will be removed in 2022.10.0
|
|
||||||
storage_path = hass.config.path(STORAGE_DIR, "zha.storage")
|
|
||||||
if os.path.isfile(storage_path):
|
|
||||||
_LOGGER.debug("removing ZHA storage file")
|
|
||||||
await hass.async_add_executor_job(os.remove, storage_path)
|
|
||||||
else:
|
|
||||||
_LOGGER.debug("ZHA storage file does not exist or was already removed")
|
|
||||||
|
|
||||||
# Load and cache device trigger information early
|
# Load and cache device trigger information early
|
||||||
device_registry = dr.async_get(hass)
|
device_registry = dr.async_get(hass)
|
||||||
radio_mgr = ZhaRadioManager.from_config_entry(hass, config_entry)
|
radio_mgr = ZhaRadioManager.from_config_entry(hass, config_entry)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user