mirror of
https://github.com/home-assistant/core.git
synced 2025-04-23 16:57:53 +00:00
Move lovelace function and exception out of const.py
This commit is contained in:
parent
8dba4affa9
commit
59e36e0294
@ -25,7 +25,8 @@ from homeassistant.core import HomeAssistant, callback
|
||||
from homeassistant.exceptions import HomeAssistantError
|
||||
from homeassistant.helpers.network import NoURLAvailableError, get_url
|
||||
|
||||
from .const import DOMAIN, LOVELACE_DATA, ConfigNotFound
|
||||
from .const import DOMAIN, LOVELACE_DATA
|
||||
from .util import ConfigNotFound
|
||||
|
||||
DEFAULT_DASHBOARD = "_default_"
|
||||
|
||||
|
@ -13,7 +13,6 @@ from homeassistant.const import (
|
||||
CONF_URL,
|
||||
EVENT_LOVELACE_UPDATED, # noqa: F401
|
||||
)
|
||||
from homeassistant.exceptions import HomeAssistantError
|
||||
from homeassistant.helpers import config_validation as cv
|
||||
from homeassistant.helpers.typing import VolDictType
|
||||
from homeassistant.util.hass_dict import HassKey
|
||||
@ -88,7 +87,3 @@ STORAGE_DASHBOARD_CREATE_FIELDS: VolDictType = {
|
||||
}
|
||||
|
||||
STORAGE_DASHBOARD_UPDATE_FIELDS = DASHBOARD_BASE_UPDATE_FIELDS
|
||||
|
||||
|
||||
class ConfigNotFound(HomeAssistantError):
|
||||
"""When no config available."""
|
||||
|
@ -32,8 +32,8 @@ from .const import (
|
||||
MODE_YAML,
|
||||
STORAGE_DASHBOARD_CREATE_FIELDS,
|
||||
STORAGE_DASHBOARD_UPDATE_FIELDS,
|
||||
ConfigNotFound,
|
||||
)
|
||||
from .util import ConfigNotFound
|
||||
|
||||
CONFIG_STORAGE_KEY_DEFAULT = DOMAIN
|
||||
CONFIG_STORAGE_KEY = "lovelace.{}"
|
||||
|
7
homeassistant/components/lovelace/util.py
Normal file
7
homeassistant/components/lovelace/util.py
Normal file
@ -0,0 +1,7 @@
|
||||
"""Utils for Lovelace."""
|
||||
|
||||
from homeassistant.exceptions import HomeAssistantError
|
||||
|
||||
|
||||
class ConfigNotFound(HomeAssistantError):
|
||||
"""When no config available."""
|
Loading…
x
Reference in New Issue
Block a user