mirror of
https://github.com/home-assistant/core
synced 2024-09-09 12:51:22 +02:00
parent
08889a9819
commit
4fdb617e22
@ -13,6 +13,7 @@ from homeassistant.config_entries import SOURCE_IMPORT, SOURCE_REAUTH
|
||||
from homeassistant.const import (
|
||||
ATTR_ATTRIBUTION,
|
||||
ATTR_DATE,
|
||||
ATTR_DEVICE_ID,
|
||||
ATTR_ENTITY_ID,
|
||||
ATTR_TIME,
|
||||
CONF_PASSWORD,
|
||||
@ -32,7 +33,6 @@ SERVICE_SETTINGS = "change_setting"
|
||||
SERVICE_CAPTURE_IMAGE = "capture_image"
|
||||
SERVICE_TRIGGER_AUTOMATION = "trigger_automation"
|
||||
|
||||
ATTR_DEVICE_ID = "device_id"
|
||||
ATTR_DEVICE_NAME = "device_name"
|
||||
ATTR_DEVICE_TYPE = "device_type"
|
||||
ATTR_EVENT_CODE = "event_code"
|
||||
|
@ -17,6 +17,7 @@ from homeassistant.components.weather import (
|
||||
)
|
||||
from homeassistant.const import (
|
||||
ATTR_DEVICE_CLASS,
|
||||
ATTR_ICON,
|
||||
CONCENTRATION_PARTS_PER_CUBIC_METER,
|
||||
DEVICE_CLASS_TEMPERATURE,
|
||||
LENGTH_FEET,
|
||||
@ -33,7 +34,6 @@ from homeassistant.const import (
|
||||
)
|
||||
|
||||
ATTRIBUTION = "Data provided by AccuWeather"
|
||||
ATTR_ICON = "icon"
|
||||
ATTR_FORECAST = CONF_FORECAST = "forecast"
|
||||
ATTR_LABEL = "label"
|
||||
ATTR_UNIT_IMPERIAL = "Imperial"
|
||||
|
@ -2,6 +2,7 @@
|
||||
from homeassistant.const import (
|
||||
ATTR_ATTRIBUTION,
|
||||
ATTR_DEVICE_CLASS,
|
||||
ATTR_ICON,
|
||||
CONCENTRATION_MICROGRAMS_PER_CUBIC_METER,
|
||||
CONCENTRATION_PARTS_PER_MILLION,
|
||||
)
|
||||
@ -20,7 +21,6 @@ from .const import (
|
||||
|
||||
ATTRIBUTION = "Data provided by AirNow"
|
||||
|
||||
ATTR_ICON = "icon"
|
||||
ATTR_LABEL = "label"
|
||||
ATTR_UNIT = "unit"
|
||||
|
||||
|
@ -8,6 +8,7 @@ from python_awair.devices import AwairDevice
|
||||
|
||||
from homeassistant.const import (
|
||||
ATTR_DEVICE_CLASS,
|
||||
ATTR_ICON,
|
||||
CONCENTRATION_MICROGRAMS_PER_CUBIC_METER,
|
||||
CONCENTRATION_PARTS_PER_BILLION,
|
||||
CONCENTRATION_PARTS_PER_MILLION,
|
||||
@ -33,7 +34,6 @@ API_VOC = "volatile_organic_compounds"
|
||||
|
||||
ATTRIBUTION = "Awair air quality sensor"
|
||||
|
||||
ATTR_ICON = "icon"
|
||||
ATTR_LABEL = "label"
|
||||
ATTR_UNIT = "unit"
|
||||
ATTR_UNIQUE_ID = "unique_id"
|
||||
|
@ -1,5 +1,5 @@
|
||||
"""Constants for Brother integration."""
|
||||
from homeassistant.const import PERCENTAGE
|
||||
from homeassistant.const import ATTR_ICON, PERCENTAGE
|
||||
|
||||
ATTR_BELT_UNIT_REMAINING_LIFE = "belt_unit_remaining_life"
|
||||
ATTR_BLACK_DRUM_COUNTER = "black_drum_counter"
|
||||
@ -20,7 +20,6 @@ ATTR_DRUM_REMAINING_PAGES = "drum_remaining_pages"
|
||||
ATTR_DUPLEX_COUNTER = "duplex_unit_pages_counter"
|
||||
ATTR_ENABLED = "enabled"
|
||||
ATTR_FUSER_REMAINING_LIFE = "fuser_remaining_life"
|
||||
ATTR_ICON = "icon"
|
||||
ATTR_LABEL = "label"
|
||||
ATTR_LASER_REMAINING_LIFE = "laser_remaining_life"
|
||||
ATTR_MAGENTA_DRUM_COUNTER = "magenta_drum_counter"
|
||||
|
@ -29,6 +29,7 @@ import voluptuous as vol
|
||||
from homeassistant.components.sensor import PLATFORM_SCHEMA
|
||||
from homeassistant.const import (
|
||||
ATTR_DEVICE_CLASS,
|
||||
ATTR_ICON,
|
||||
ATTR_ID,
|
||||
CONF_RESOURCES,
|
||||
DEVICE_CLASS_ENERGY,
|
||||
@ -72,7 +73,6 @@ ATTR_SUPPLY_TEMPERATURE = "supply_temperature"
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
ATTR_ICON = "icon"
|
||||
ATTR_LABEL = "label"
|
||||
ATTR_MULTIPLIER = "multiplier"
|
||||
ATTR_UNIT = "unit"
|
||||
|
@ -9,6 +9,7 @@ from homeassistant.components.image_processing import (
|
||||
CONF_SOURCE,
|
||||
ImageProcessingFaceEntity,
|
||||
)
|
||||
from homeassistant.const import ATTR_LOCATION
|
||||
from homeassistant.core import split_entity_id
|
||||
|
||||
# pylint: disable=unused-import
|
||||
@ -16,8 +17,6 @@ from homeassistant.components.image_processing import ( # noqa: F401, isort:ski
|
||||
PLATFORM_SCHEMA,
|
||||
)
|
||||
|
||||
ATTR_LOCATION = "location"
|
||||
|
||||
|
||||
def setup_platform(hass, config, add_entities, discovery_info=None):
|
||||
"""Set up the Dlib Face detection platform."""
|
||||
|
@ -14,12 +14,12 @@ from homeassistant.components.image_processing import (
|
||||
PLATFORM_SCHEMA,
|
||||
ImageProcessingFaceEntity,
|
||||
)
|
||||
from homeassistant.const import ATTR_NAME
|
||||
from homeassistant.core import split_entity_id
|
||||
import homeassistant.helpers.config_validation as cv
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
ATTR_NAME = "name"
|
||||
CONF_FACES = "faces"
|
||||
|
||||
PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend(
|
||||
|
@ -12,6 +12,5 @@ ATTR_MANUFACTURER = "manufacturer"
|
||||
ATTR_MODEL = "model"
|
||||
ATTR_ON = "on"
|
||||
ATTR_SOFTWARE_VERSION = "sw_version"
|
||||
ATTR_TEMPERATURE = "temperature"
|
||||
|
||||
CONF_SERIAL_NUMBER = "serial_number"
|
||||
|
@ -15,7 +15,7 @@ from homeassistant.components.light import (
|
||||
LightEntity,
|
||||
)
|
||||
from homeassistant.config_entries import ConfigEntry
|
||||
from homeassistant.const import ATTR_NAME
|
||||
from homeassistant.const import ATTR_NAME, ATTR_TEMPERATURE
|
||||
from homeassistant.helpers.entity import Entity
|
||||
from homeassistant.helpers.typing import HomeAssistantType
|
||||
|
||||
@ -25,7 +25,6 @@ from .const import (
|
||||
ATTR_MODEL,
|
||||
ATTR_ON,
|
||||
ATTR_SOFTWARE_VERSION,
|
||||
ATTR_TEMPERATURE,
|
||||
DATA_ELGATO_CLIENT,
|
||||
DOMAIN,
|
||||
)
|
||||
|
@ -7,6 +7,7 @@ import voluptuous as vol
|
||||
|
||||
from homeassistant import config_entries
|
||||
from homeassistant.const import (
|
||||
ATTR_NAME,
|
||||
CONF_HOST,
|
||||
CONF_NAME,
|
||||
CONF_PASSWORD,
|
||||
@ -27,7 +28,6 @@ from .const import (
|
||||
DEFAULT_USERNAME,
|
||||
DOMAIN,
|
||||
FRITZ_ACTION_GET_INFO,
|
||||
FRITZ_ATTR_NAME,
|
||||
FRITZ_ATTR_SERIAL_NUMBER,
|
||||
FRITZ_SERVICE_DEVICE_INFO,
|
||||
SERIAL_NUMBER,
|
||||
@ -119,7 +119,7 @@ class FritzBoxCallMonitorConfigFlow(config_entries.ConfigFlow, domain=DOMAIN):
|
||||
phonebook_info = await self.hass.async_add_executor_job(
|
||||
self._fritzbox_phonebook.fph.phonebook_info, phonebook_id
|
||||
)
|
||||
return phonebook_info[FRITZ_ATTR_NAME]
|
||||
return phonebook_info[ATTR_NAME]
|
||||
|
||||
async def _get_list_of_phonebook_names(self):
|
||||
"""Return list of names for all available phonebooks."""
|
||||
|
@ -15,7 +15,6 @@ ICON_PHONE = "mdi:phone"
|
||||
ATTR_PREFIXES = "prefixes"
|
||||
|
||||
FRITZ_ACTION_GET_INFO = "GetInfo"
|
||||
FRITZ_ATTR_NAME = "name"
|
||||
FRITZ_ATTR_SERIAL_NUMBER = "NewSerialNumber"
|
||||
FRITZ_SERVICE_DEVICE_INFO = "DeviceInfo"
|
||||
|
||||
|
@ -1,7 +1,6 @@
|
||||
"""Constants for GIOS integration."""
|
||||
from datetime import timedelta
|
||||
|
||||
ATTR_NAME = "name"
|
||||
ATTR_STATION = "station"
|
||||
CONF_STATION_ID = "station_id"
|
||||
DEFAULT_NAME = "GIOŚ"
|
||||
|
@ -7,14 +7,19 @@ import voluptuous as vol
|
||||
|
||||
from homeassistant import config_entries
|
||||
from homeassistant.config_entries import ConfigEntry
|
||||
from homeassistant.const import CONF_API_KEY, CONF_NAME, CONF_SENSORS, CONF_URL
|
||||
from homeassistant.const import (
|
||||
ATTR_NAME,
|
||||
CONF_API_KEY,
|
||||
CONF_NAME,
|
||||
CONF_SENSORS,
|
||||
CONF_URL,
|
||||
)
|
||||
from homeassistant.core import HomeAssistant
|
||||
from homeassistant.helpers import config_validation as cv
|
||||
from homeassistant.helpers.aiohttp_client import async_get_clientsession
|
||||
|
||||
from .const import (
|
||||
ATTR_ARGS,
|
||||
ATTR_NAME,
|
||||
ATTR_PATH,
|
||||
CONF_API_USER,
|
||||
DEFAULT_URL,
|
||||
|
@ -1,6 +1,6 @@
|
||||
"""Constants for the habitica integration."""
|
||||
|
||||
from homeassistant.const import CONF_NAME, CONF_PATH
|
||||
from homeassistant.const import CONF_PATH
|
||||
|
||||
CONF_API_USER = "api_user"
|
||||
|
||||
@ -8,7 +8,6 @@ DEFAULT_URL = "https://habitica.com"
|
||||
DOMAIN = "habitica"
|
||||
|
||||
SERVICE_API_CALL = "api_call"
|
||||
ATTR_NAME = CONF_NAME
|
||||
ATTR_PATH = CONF_PATH
|
||||
ATTR_ARGS = "args"
|
||||
EVENT_API_CALL_SUCCESS = f"{DOMAIN}_{SERVICE_API_CALL}_success"
|
||||
|
@ -10,6 +10,7 @@ from homeassistant.auth.const import GROUP_ID_ADMIN
|
||||
from homeassistant.components.homeassistant import SERVICE_CHECK_CONFIG
|
||||
import homeassistant.config as conf_util
|
||||
from homeassistant.const import (
|
||||
ATTR_NAME,
|
||||
EVENT_CORE_CONFIG_UPDATE,
|
||||
SERVICE_HOMEASSISTANT_RESTART,
|
||||
SERVICE_HOMEASSISTANT_STOP,
|
||||
@ -30,7 +31,6 @@ from .const import (
|
||||
ATTR_FOLDERS,
|
||||
ATTR_HOMEASSISTANT,
|
||||
ATTR_INPUT,
|
||||
ATTR_NAME,
|
||||
ATTR_PASSWORD,
|
||||
ATTR_SNAPSHOT,
|
||||
DOMAIN,
|
||||
|
@ -5,10 +5,10 @@ import logging
|
||||
from aiohttp import web
|
||||
|
||||
from homeassistant.components.http import HomeAssistantView
|
||||
from homeassistant.const import HTTP_BAD_REQUEST
|
||||
from homeassistant.const import ATTR_ICON, HTTP_BAD_REQUEST
|
||||
from homeassistant.helpers.typing import HomeAssistantType
|
||||
|
||||
from .const import ATTR_ADMIN, ATTR_ENABLE, ATTR_ICON, ATTR_PANELS, ATTR_TITLE
|
||||
from .const import ATTR_ADMIN, ATTR_ENABLE, ATTR_PANELS, ATTR_TITLE
|
||||
from .handler import HassioAPIError
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
@ -11,9 +11,7 @@ ATTR_DISCOVERY = "discovery"
|
||||
ATTR_ENABLE = "enable"
|
||||
ATTR_FOLDERS = "folders"
|
||||
ATTR_HOMEASSISTANT = "homeassistant"
|
||||
ATTR_ICON = "icon"
|
||||
ATTR_INPUT = "input"
|
||||
ATTR_NAME = "name"
|
||||
ATTR_PANELS = "panels"
|
||||
ATTR_PASSWORD = "password"
|
||||
ATTR_SNAPSHOT = "snapshot"
|
||||
|
@ -6,10 +6,10 @@ from aiohttp import web
|
||||
from aiohttp.web_exceptions import HTTPServiceUnavailable
|
||||
|
||||
from homeassistant.components.http import HomeAssistantView
|
||||
from homeassistant.const import ATTR_SERVICE, EVENT_HOMEASSISTANT_START
|
||||
from homeassistant.const import ATTR_NAME, ATTR_SERVICE, EVENT_HOMEASSISTANT_START
|
||||
from homeassistant.core import callback
|
||||
|
||||
from .const import ATTR_ADDON, ATTR_CONFIG, ATTR_DISCOVERY, ATTR_NAME, ATTR_UUID
|
||||
from .const import ATTR_ADDON, ATTR_CONFIG, ATTR_DISCOVERY, ATTR_UUID
|
||||
from .handler import HassioAPIError
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
@ -23,7 +23,6 @@ from homeassistant.helpers.entity import Entity
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
ATTR_AVAILABLE = "available"
|
||||
ATTR_MODE = "mode"
|
||||
DOMAIN = "hive"
|
||||
DATA_HIVE = "data_hive"
|
||||
SERVICES = ["Heating", "HotWater", "TRV"]
|
||||
|
@ -9,7 +9,7 @@ from homematicip.aio.home import AsyncHome
|
||||
from homematicip.base.helpers import handle_config
|
||||
import voluptuous as vol
|
||||
|
||||
from homeassistant.const import ATTR_ENTITY_ID
|
||||
from homeassistant.const import ATTR_ENTITY_ID, ATTR_TEMPERATURE
|
||||
import homeassistant.helpers.config_validation as cv
|
||||
from homeassistant.helpers.config_validation import comp_entity_ids
|
||||
from homeassistant.helpers.service import (
|
||||
@ -29,7 +29,6 @@ ATTR_CONFIG_OUTPUT_FILE_PREFIX = "config_output_file_prefix"
|
||||
ATTR_CONFIG_OUTPUT_PATH = "config_output_path"
|
||||
ATTR_DURATION = "duration"
|
||||
ATTR_ENDTIME = "endtime"
|
||||
ATTR_TEMPERATURE = "temperature"
|
||||
|
||||
DEFAULT_CONFIG_FILE_PREFIX = "hmip-config"
|
||||
|
||||
|
@ -26,6 +26,7 @@ from homeassistant.components.notify import (
|
||||
BaseNotificationService,
|
||||
)
|
||||
from homeassistant.const import (
|
||||
ATTR_NAME,
|
||||
HTTP_BAD_REQUEST,
|
||||
HTTP_INTERNAL_SERVER_ERROR,
|
||||
HTTP_UNAUTHORIZED,
|
||||
@ -73,7 +74,6 @@ PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend(
|
||||
|
||||
ATTR_SUBSCRIPTION = "subscription"
|
||||
ATTR_BROWSER = "browser"
|
||||
ATTR_NAME = "name"
|
||||
|
||||
ATTR_ENDPOINT = "endpoint"
|
||||
ATTR_KEYS = "keys"
|
||||
|
@ -7,6 +7,7 @@ import voluptuous as vol
|
||||
|
||||
from homeassistant.config_entries import ConfigEntry
|
||||
from homeassistant.const import (
|
||||
ATTR_MODE,
|
||||
SERVICE_TOGGLE,
|
||||
SERVICE_TURN_OFF,
|
||||
SERVICE_TURN_ON,
|
||||
@ -27,7 +28,6 @@ from .const import (
|
||||
ATTR_HUMIDITY,
|
||||
ATTR_MAX_HUMIDITY,
|
||||
ATTR_MIN_HUMIDITY,
|
||||
ATTR_MODE,
|
||||
DEFAULT_MAX_HUMIDITY,
|
||||
DEFAULT_MIN_HUMIDITY,
|
||||
DEVICE_CLASS_DEHUMIDIFIER,
|
||||
|
@ -1,4 +1,5 @@
|
||||
"""Provides the constants needed for component."""
|
||||
from homeassistant.const import ATTR_MODE # noqa: F401 pylint: disable=unused-import
|
||||
|
||||
MODE_NORMAL = "normal"
|
||||
MODE_ECO = "eco"
|
||||
@ -10,7 +11,6 @@ MODE_SLEEP = "sleep"
|
||||
MODE_AUTO = "auto"
|
||||
MODE_BABY = "baby"
|
||||
|
||||
ATTR_MODE = "mode"
|
||||
ATTR_AVAILABLE_MODES = "available_modes"
|
||||
ATTR_HUMIDITY = "humidity"
|
||||
ATTR_MAX_HUMIDITY = "max_humidity"
|
||||
|
@ -14,12 +14,12 @@ from homeassistant.components.fritzbox_callmonitor.const import (
|
||||
CONF_PHONEBOOK,
|
||||
CONF_PREFIXES,
|
||||
DOMAIN,
|
||||
FRITZ_ATTR_NAME,
|
||||
FRITZ_ATTR_SERIAL_NUMBER,
|
||||
SERIAL_NUMBER,
|
||||
)
|
||||
from homeassistant.config_entries import SOURCE_IMPORT, SOURCE_USER
|
||||
from homeassistant.const import (
|
||||
ATTR_NAME,
|
||||
CONF_HOST,
|
||||
CONF_NAME,
|
||||
CONF_PASSWORD,
|
||||
@ -69,8 +69,8 @@ MOCK_YAML_CONFIG = {
|
||||
CONF_NAME: MOCK_NAME,
|
||||
}
|
||||
MOCK_DEVICE_INFO = {FRITZ_ATTR_SERIAL_NUMBER: MOCK_SERIAL_NUMBER}
|
||||
MOCK_PHONEBOOK_INFO_1 = {FRITZ_ATTR_NAME: MOCK_PHONEBOOK_NAME_1}
|
||||
MOCK_PHONEBOOK_INFO_2 = {FRITZ_ATTR_NAME: MOCK_PHONEBOOK_NAME_2}
|
||||
MOCK_PHONEBOOK_INFO_1 = {ATTR_NAME: MOCK_PHONEBOOK_NAME_1}
|
||||
MOCK_PHONEBOOK_INFO_2 = {ATTR_NAME: MOCK_PHONEBOOK_NAME_2}
|
||||
MOCK_UNIQUE_ID = f"{MOCK_SERIAL_NUMBER}-{MOCK_PHONEBOOK_ID}"
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user