Import constants from root (#78271)
parent
7aa7458a22
commit
7871a517a8
|
@ -21,7 +21,7 @@ import voluptuous as vol
|
||||||
|
|
||||||
from homeassistant.components import websocket_api
|
from homeassistant.components import websocket_api
|
||||||
from homeassistant.components.http import KEY_AUTHENTICATED, HomeAssistantView
|
from homeassistant.components.http import KEY_AUTHENTICATED, HomeAssistantView
|
||||||
from homeassistant.components.media_player.const import (
|
from homeassistant.components.media_player import (
|
||||||
ATTR_MEDIA_CONTENT_ID,
|
ATTR_MEDIA_CONTENT_ID,
|
||||||
ATTR_MEDIA_CONTENT_TYPE,
|
ATTR_MEDIA_CONTENT_TYPE,
|
||||||
DOMAIN as DOMAIN_MP,
|
DOMAIN as DOMAIN_MP,
|
||||||
|
|
|
@ -6,7 +6,7 @@ import logging
|
||||||
from hass_nabucasa import Cloud, cloud_api
|
from hass_nabucasa import Cloud, cloud_api
|
||||||
from hass_nabucasa.google_report_state import ErrorResponse
|
from hass_nabucasa.google_report_state import ErrorResponse
|
||||||
|
|
||||||
from homeassistant.components.google_assistant.const import DOMAIN as GOOGLE_DOMAIN
|
from homeassistant.components.google_assistant import DOMAIN as GOOGLE_DOMAIN
|
||||||
from homeassistant.components.google_assistant.helpers import AbstractConfig
|
from homeassistant.components.google_assistant.helpers import AbstractConfig
|
||||||
from homeassistant.const import CLOUD_NEVER_EXPOSED_ENTITIES
|
from homeassistant.const import CLOUD_NEVER_EXPOSED_ENTITIES
|
||||||
from homeassistant.core import CoreState, Event, callback, split_entity_id
|
from homeassistant.core import CoreState, Event, callback, split_entity_id
|
||||||
|
|
|
@ -43,7 +43,7 @@ from homeassistant.components.light import (
|
||||||
ATTR_XY_COLOR,
|
ATTR_XY_COLOR,
|
||||||
LightEntityFeature,
|
LightEntityFeature,
|
||||||
)
|
)
|
||||||
from homeassistant.components.media_player.const import (
|
from homeassistant.components.media_player import (
|
||||||
ATTR_MEDIA_VOLUME_LEVEL,
|
ATTR_MEDIA_VOLUME_LEVEL,
|
||||||
MediaPlayerEntityFeature,
|
MediaPlayerEntityFeature,
|
||||||
)
|
)
|
||||||
|
|
|
@ -5,7 +5,7 @@ from datetime import timedelta
|
||||||
import logging
|
import logging
|
||||||
from typing import Final
|
from typing import Final
|
||||||
|
|
||||||
from homeassistant.components.media_player.const import MediaPlayerEntityFeature
|
from homeassistant.components.media_player import MediaPlayerEntityFeature
|
||||||
|
|
||||||
DOMAIN: Final = "fully_kiosk"
|
DOMAIN: Final = "fully_kiosk"
|
||||||
|
|
||||||
|
|
|
@ -3,8 +3,7 @@ from __future__ import annotations
|
||||||
|
|
||||||
from typing import Any
|
from typing import Any
|
||||||
|
|
||||||
from homeassistant.components.diagnostics import async_redact_data
|
from homeassistant.components.diagnostics import REDACTED, async_redact_data
|
||||||
from homeassistant.components.diagnostics.const import REDACTED
|
|
||||||
from homeassistant.config_entries import ConfigEntry
|
from homeassistant.config_entries import ConfigEntry
|
||||||
from homeassistant.const import CONF_API_KEY
|
from homeassistant.const import CONF_API_KEY
|
||||||
from homeassistant.core import HomeAssistant
|
from homeassistant.core import HomeAssistant
|
||||||
|
|
|
@ -10,8 +10,7 @@ import voluptuous as vol
|
||||||
|
|
||||||
from homeassistant.auth.models import User
|
from homeassistant.auth.models import User
|
||||||
from homeassistant.auth.providers import homeassistant as auth_ha
|
from homeassistant.auth.providers import homeassistant as auth_ha
|
||||||
from homeassistant.components.http import HomeAssistantView
|
from homeassistant.components.http import KEY_HASS_USER, HomeAssistantView
|
||||||
from homeassistant.components.http.const import KEY_HASS_USER
|
|
||||||
from homeassistant.components.http.data_validator import RequestDataValidator
|
from homeassistant.components.http.data_validator import RequestDataValidator
|
||||||
from homeassistant.core import HomeAssistant, callback
|
from homeassistant.core import HomeAssistant, callback
|
||||||
import homeassistant.helpers.config_validation as cv
|
import homeassistant.helpers.config_validation as cv
|
||||||
|
|
|
@ -23,7 +23,7 @@ from homeassistant.components.binary_sensor import (
|
||||||
from homeassistant.components.camera import DOMAIN as CAMERA_DOMAIN
|
from homeassistant.components.camera import DOMAIN as CAMERA_DOMAIN
|
||||||
from homeassistant.components.http import HomeAssistantView
|
from homeassistant.components.http import HomeAssistantView
|
||||||
from homeassistant.components.humidifier import DOMAIN as HUMIDIFIER_DOMAIN
|
from homeassistant.components.humidifier import DOMAIN as HUMIDIFIER_DOMAIN
|
||||||
from homeassistant.components.network.const import MDNS_TARGET_IP
|
from homeassistant.components.network import MDNS_TARGET_IP
|
||||||
from homeassistant.components.sensor import DOMAIN as SENSOR_DOMAIN, SensorDeviceClass
|
from homeassistant.components.sensor import DOMAIN as SENSOR_DOMAIN, SensorDeviceClass
|
||||||
from homeassistant.config_entries import SOURCE_IMPORT, ConfigEntry
|
from homeassistant.config_entries import SOURCE_IMPORT, ConfigEntry
|
||||||
from homeassistant.const import (
|
from homeassistant.const import (
|
||||||
|
|
|
@ -7,7 +7,7 @@ from typing import Any
|
||||||
import voluptuous as vol
|
import voluptuous as vol
|
||||||
|
|
||||||
from homeassistant.components import frontend
|
from homeassistant.components import frontend
|
||||||
from homeassistant.components.recorder.const import DOMAIN as RECORDER_DOMAIN
|
from homeassistant.components.recorder import DOMAIN as RECORDER_DOMAIN
|
||||||
from homeassistant.components.recorder.filters import (
|
from homeassistant.components.recorder.filters import (
|
||||||
extract_include_exclude_filter_conf,
|
extract_include_exclude_filter_conf,
|
||||||
merge_include_exclude_filters,
|
merge_include_exclude_filters,
|
||||||
|
|
|
@ -5,7 +5,7 @@ from __future__ import annotations
|
||||||
from pychromecast import Chromecast
|
from pychromecast import Chromecast
|
||||||
from pychromecast.const import CAST_TYPE_CHROMECAST
|
from pychromecast.const import CAST_TYPE_CHROMECAST
|
||||||
|
|
||||||
from homeassistant.components.cast.const import DOMAIN as CAST_DOMAIN
|
from homeassistant.components.cast import DOMAIN as CAST_DOMAIN
|
||||||
from homeassistant.components.cast.home_assistant_cast import (
|
from homeassistant.components.cast.home_assistant_cast import (
|
||||||
ATTR_URL_PATH,
|
ATTR_URL_PATH,
|
||||||
ATTR_VIEW_PATH,
|
ATTR_VIEW_PATH,
|
||||||
|
|
|
@ -10,9 +10,7 @@ from typing import Any
|
||||||
import voluptuous as vol
|
import voluptuous as vol
|
||||||
|
|
||||||
import homeassistant.components.alarm_control_panel as alarm
|
import homeassistant.components.alarm_control_panel as alarm
|
||||||
from homeassistant.components.alarm_control_panel.const import (
|
from homeassistant.components.alarm_control_panel import AlarmControlPanelEntityFeature
|
||||||
AlarmControlPanelEntityFeature,
|
|
||||||
)
|
|
||||||
from homeassistant.const import (
|
from homeassistant.const import (
|
||||||
CONF_ARMING_TIME,
|
CONF_ARMING_TIME,
|
||||||
CONF_CODE,
|
CONF_CODE,
|
||||||
|
|
|
@ -5,11 +5,11 @@ import voluptuous as vol
|
||||||
from youtube_dl import YoutubeDL
|
from youtube_dl import YoutubeDL
|
||||||
from youtube_dl.utils import DownloadError, ExtractorError
|
from youtube_dl.utils import DownloadError, ExtractorError
|
||||||
|
|
||||||
from homeassistant.components.media_player import MEDIA_PLAYER_PLAY_MEDIA_SCHEMA
|
from homeassistant.components.media_player import (
|
||||||
from homeassistant.components.media_player.const import (
|
|
||||||
ATTR_MEDIA_CONTENT_ID,
|
ATTR_MEDIA_CONTENT_ID,
|
||||||
ATTR_MEDIA_CONTENT_TYPE,
|
ATTR_MEDIA_CONTENT_TYPE,
|
||||||
DOMAIN as MEDIA_PLAYER_DOMAIN,
|
DOMAIN as MEDIA_PLAYER_DOMAIN,
|
||||||
|
MEDIA_PLAYER_PLAY_MEDIA_SCHEMA,
|
||||||
SERVICE_PLAY_MEDIA,
|
SERVICE_PLAY_MEDIA,
|
||||||
)
|
)
|
||||||
from homeassistant.const import ATTR_ENTITY_ID
|
from homeassistant.const import ATTR_ENTITY_ID
|
||||||
|
|
|
@ -27,7 +27,7 @@ from homeassistant.components.sensor import (
|
||||||
DEVICE_CLASSES as SENSOR_CLASSES,
|
DEVICE_CLASSES as SENSOR_CLASSES,
|
||||||
STATE_CLASSES as SENSOSR_STATE_CLASSES,
|
STATE_CLASSES as SENSOSR_STATE_CLASSES,
|
||||||
)
|
)
|
||||||
from homeassistant.components.zone.const import DOMAIN as ZONE_DOMAIN
|
from homeassistant.components.zone import DOMAIN as ZONE_DOMAIN
|
||||||
from homeassistant.const import (
|
from homeassistant.const import (
|
||||||
ATTR_DEVICE_ID,
|
ATTR_DEVICE_ID,
|
||||||
ATTR_DOMAIN,
|
ATTR_DOMAIN,
|
||||||
|
|
|
@ -36,7 +36,7 @@ from motioneye_client.const import (
|
||||||
)
|
)
|
||||||
|
|
||||||
from homeassistant.components.camera import DOMAIN as CAMERA_DOMAIN
|
from homeassistant.components.camera import DOMAIN as CAMERA_DOMAIN
|
||||||
from homeassistant.components.media_source.const import URI_SCHEME
|
from homeassistant.components.media_source import URI_SCHEME
|
||||||
from homeassistant.components.sensor import DOMAIN as SENSOR_DOMAIN
|
from homeassistant.components.sensor import DOMAIN as SENSOR_DOMAIN
|
||||||
from homeassistant.components.switch import DOMAIN as SWITCH_DOMAIN
|
from homeassistant.components.switch import DOMAIN as SWITCH_DOMAIN
|
||||||
from homeassistant.components.webhook import (
|
from homeassistant.components.webhook import (
|
||||||
|
|
|
@ -27,7 +27,7 @@ from homeassistant.components.application_credentials import (
|
||||||
async_import_client_credential,
|
async_import_client_credential,
|
||||||
)
|
)
|
||||||
from homeassistant.components.camera import Image, img_util
|
from homeassistant.components.camera import Image, img_util
|
||||||
from homeassistant.components.http.const import KEY_HASS_USER
|
from homeassistant.components.http import KEY_HASS_USER
|
||||||
from homeassistant.components.http.view import HomeAssistantView
|
from homeassistant.components.http.view import HomeAssistantView
|
||||||
from homeassistant.config_entries import ConfigEntry
|
from homeassistant.config_entries import ConfigEntry
|
||||||
from homeassistant.const import (
|
from homeassistant.const import (
|
||||||
|
|
|
@ -9,12 +9,12 @@ from eiscp import eISCP
|
||||||
import voluptuous as vol
|
import voluptuous as vol
|
||||||
|
|
||||||
from homeassistant.components.media_player import (
|
from homeassistant.components.media_player import (
|
||||||
|
DOMAIN,
|
||||||
PLATFORM_SCHEMA,
|
PLATFORM_SCHEMA,
|
||||||
MediaPlayerEntity,
|
MediaPlayerEntity,
|
||||||
MediaPlayerEntityFeature,
|
MediaPlayerEntityFeature,
|
||||||
MediaPlayerState,
|
MediaPlayerState,
|
||||||
)
|
)
|
||||||
from homeassistant.components.media_player.const import DOMAIN
|
|
||||||
from homeassistant.const import ATTR_ENTITY_ID, CONF_HOST, CONF_NAME
|
from homeassistant.const import ATTR_ENTITY_ID, CONF_HOST, CONF_NAME
|
||||||
from homeassistant.core import HomeAssistant, ServiceCall
|
from homeassistant.core import HomeAssistant, ServiceCall
|
||||||
import homeassistant.helpers.config_validation as cv
|
import homeassistant.helpers.config_validation as cv
|
||||||
|
|
|
@ -12,8 +12,8 @@ from homeassistant.components.ffmpeg import CONF_EXTRA_ARGUMENTS, get_ffmpeg_man
|
||||||
from homeassistant.components.stream import (
|
from homeassistant.components.stream import (
|
||||||
CONF_RTSP_TRANSPORT,
|
CONF_RTSP_TRANSPORT,
|
||||||
CONF_USE_WALLCLOCK_AS_TIMESTAMPS,
|
CONF_USE_WALLCLOCK_AS_TIMESTAMPS,
|
||||||
|
RTSP_TRANSPORTS,
|
||||||
)
|
)
|
||||||
from homeassistant.components.stream.const import RTSP_TRANSPORTS
|
|
||||||
from homeassistant.config_entries import ConfigEntry
|
from homeassistant.config_entries import ConfigEntry
|
||||||
from homeassistant.const import HTTP_BASIC_AUTHENTICATION
|
from homeassistant.const import HTTP_BASIC_AUTHENTICATION
|
||||||
from homeassistant.core import HomeAssistant
|
from homeassistant.core import HomeAssistant
|
||||||
|
|
|
@ -4,7 +4,7 @@ from __future__ import annotations
|
||||||
from pychromecast import Chromecast
|
from pychromecast import Chromecast
|
||||||
from pychromecast.controllers.plex import PlexController
|
from pychromecast.controllers.plex import PlexController
|
||||||
|
|
||||||
from homeassistant.components.cast.const import DOMAIN as CAST_DOMAIN
|
from homeassistant.components.cast import DOMAIN as CAST_DOMAIN
|
||||||
from homeassistant.components.media_player import BrowseMedia, MediaClass, MediaType
|
from homeassistant.components.media_player import BrowseMedia, MediaClass, MediaType
|
||||||
from homeassistant.core import HomeAssistant
|
from homeassistant.core import HomeAssistant
|
||||||
|
|
||||||
|
|
|
@ -21,7 +21,7 @@ from homeassistant.components.media_player import (
|
||||||
MediaType,
|
MediaType,
|
||||||
async_process_play_media_url,
|
async_process_play_media_url,
|
||||||
)
|
)
|
||||||
from homeassistant.components.stream.const import FORMAT_CONTENT_TYPE, HLS_PROVIDER
|
from homeassistant.components.stream import FORMAT_CONTENT_TYPE, HLS_PROVIDER
|
||||||
from homeassistant.config_entries import ConfigEntry
|
from homeassistant.config_entries import ConfigEntry
|
||||||
from homeassistant.const import ATTR_NAME
|
from homeassistant.const import ATTR_NAME
|
||||||
from homeassistant.core import HomeAssistant
|
from homeassistant.core import HomeAssistant
|
||||||
|
|
|
@ -12,12 +12,12 @@ from typing import Any
|
||||||
from sqlalchemy.orm.session import Session
|
from sqlalchemy.orm.session import Session
|
||||||
|
|
||||||
from homeassistant.components.recorder import (
|
from homeassistant.components.recorder import (
|
||||||
|
DOMAIN as RECORDER_DOMAIN,
|
||||||
history,
|
history,
|
||||||
is_entity_recorded,
|
is_entity_recorded,
|
||||||
statistics,
|
statistics,
|
||||||
util as recorder_util,
|
util as recorder_util,
|
||||||
)
|
)
|
||||||
from homeassistant.components.recorder.const import DOMAIN as RECORDER_DOMAIN
|
|
||||||
from homeassistant.components.recorder.models import (
|
from homeassistant.components.recorder.models import (
|
||||||
StatisticData,
|
StatisticData,
|
||||||
StatisticMetaData,
|
StatisticMetaData,
|
||||||
|
|
|
@ -29,7 +29,7 @@ from homeassistant.components.media_player import (
|
||||||
RepeatMode,
|
RepeatMode,
|
||||||
async_process_play_media_url,
|
async_process_play_media_url,
|
||||||
)
|
)
|
||||||
from homeassistant.components.plex.const import PLEX_URI_SCHEME
|
from homeassistant.components.plex import PLEX_URI_SCHEME
|
||||||
from homeassistant.components.plex.services import process_plex_payload
|
from homeassistant.components.plex.services import process_plex_payload
|
||||||
from homeassistant.config_entries import ConfigEntry
|
from homeassistant.config_entries import ConfigEntry
|
||||||
from homeassistant.const import ATTR_TIME
|
from homeassistant.const import ATTR_TIME
|
||||||
|
|
|
@ -4,7 +4,7 @@ from __future__ import annotations
|
||||||
from typing import Any
|
from typing import Any
|
||||||
|
|
||||||
from homeassistant.components.cover import CoverEntity, CoverEntityFeature
|
from homeassistant.components.cover import CoverEntity, CoverEntityFeature
|
||||||
from homeassistant.components.switch.const import DOMAIN as SWITCH_DOMAIN
|
from homeassistant.components.switch import DOMAIN as SWITCH_DOMAIN
|
||||||
from homeassistant.config_entries import ConfigEntry
|
from homeassistant.config_entries import ConfigEntry
|
||||||
from homeassistant.const import (
|
from homeassistant.const import (
|
||||||
ATTR_ENTITY_ID,
|
ATTR_ENTITY_ID,
|
||||||
|
|
|
@ -3,7 +3,7 @@ from __future__ import annotations
|
||||||
|
|
||||||
from typing import Any
|
from typing import Any
|
||||||
|
|
||||||
from homeassistant.components.switch.const import DOMAIN as SWITCH_DOMAIN
|
from homeassistant.components.switch import DOMAIN as SWITCH_DOMAIN
|
||||||
from homeassistant.const import (
|
from homeassistant.const import (
|
||||||
ATTR_ENTITY_ID,
|
ATTR_ENTITY_ID,
|
||||||
SERVICE_TURN_OFF,
|
SERVICE_TURN_OFF,
|
||||||
|
|
|
@ -4,7 +4,7 @@ from __future__ import annotations
|
||||||
from typing import Any
|
from typing import Any
|
||||||
|
|
||||||
from homeassistant.components.lock import LockEntity
|
from homeassistant.components.lock import LockEntity
|
||||||
from homeassistant.components.switch.const import DOMAIN as SWITCH_DOMAIN
|
from homeassistant.components.switch import DOMAIN as SWITCH_DOMAIN
|
||||||
from homeassistant.config_entries import ConfigEntry
|
from homeassistant.config_entries import ConfigEntry
|
||||||
from homeassistant.const import (
|
from homeassistant.const import (
|
||||||
ATTR_ENTITY_ID,
|
ATTR_ENTITY_ID,
|
||||||
|
|
|
@ -6,11 +6,11 @@ from typing import Any
|
||||||
|
|
||||||
import voluptuous as vol
|
import voluptuous as vol
|
||||||
|
|
||||||
from homeassistant.components.select import SelectEntity
|
from homeassistant.components.select import (
|
||||||
from homeassistant.components.select.const import (
|
|
||||||
ATTR_OPTION,
|
ATTR_OPTION,
|
||||||
ATTR_OPTIONS,
|
ATTR_OPTIONS,
|
||||||
DOMAIN as SELECT_DOMAIN,
|
DOMAIN as SELECT_DOMAIN,
|
||||||
|
SelectEntity,
|
||||||
)
|
)
|
||||||
from homeassistant.const import CONF_NAME, CONF_OPTIMISTIC, CONF_STATE, CONF_UNIQUE_ID
|
from homeassistant.const import CONF_NAME, CONF_OPTIMISTIC, CONF_STATE, CONF_UNIQUE_ID
|
||||||
from homeassistant.core import HomeAssistant
|
from homeassistant.core import HomeAssistant
|
||||||
|
|
|
@ -20,8 +20,7 @@ from zeroconf.asyncio import AsyncServiceInfo
|
||||||
|
|
||||||
from homeassistant import config_entries
|
from homeassistant import config_entries
|
||||||
from homeassistant.components import network
|
from homeassistant.components import network
|
||||||
from homeassistant.components.network import async_get_source_ip
|
from homeassistant.components.network import MDNS_TARGET_IP, async_get_source_ip
|
||||||
from homeassistant.components.network.const import MDNS_TARGET_IP
|
|
||||||
from homeassistant.components.network.models import Adapter
|
from homeassistant.components.network.models import Adapter
|
||||||
from homeassistant.const import (
|
from homeassistant.const import (
|
||||||
EVENT_HOMEASSISTANT_START,
|
EVENT_HOMEASSISTANT_START,
|
||||||
|
|
|
@ -11,7 +11,7 @@ from zwave_js_server.dump import dump_msgs
|
||||||
from zwave_js_server.model.node import Node, NodeDataType
|
from zwave_js_server.model.node import Node, NodeDataType
|
||||||
from zwave_js_server.model.value import ValueDataType
|
from zwave_js_server.model.value import ValueDataType
|
||||||
|
|
||||||
from homeassistant.components.diagnostics.const import REDACTED
|
from homeassistant.components.diagnostics import REDACTED
|
||||||
from homeassistant.components.diagnostics.util import async_redact_data
|
from homeassistant.components.diagnostics.util import async_redact_data
|
||||||
from homeassistant.config_entries import ConfigEntry
|
from homeassistant.config_entries import ConfigEntry
|
||||||
from homeassistant.const import CONF_URL
|
from homeassistant.const import CONF_URL
|
||||||
|
|
Loading…
Reference in New Issue