diff --git a/homeassistant/components/automation/__init__.py b/homeassistant/components/automation/__init__.py index acb28df05b0..f12a7398f7e 100644 --- a/homeassistant/components/automation/__init__.py +++ b/homeassistant/components/automation/__init__.py @@ -10,6 +10,7 @@ from voluptuous.humanize import humanize_error from homeassistant.components import blueprint from homeassistant.const import ( ATTR_ENTITY_ID, + ATTR_MODE, ATTR_NAME, CONF_ALIAS, CONF_CONDITION, @@ -53,7 +54,6 @@ from homeassistant.helpers.restore_state import RestoreEntity from homeassistant.helpers.script import ( ATTR_CUR, ATTR_MAX, - ATTR_MODE, CONF_MAX, CONF_MAX_EXCEEDED, Script, diff --git a/homeassistant/components/script/__init__.py b/homeassistant/components/script/__init__.py index 429e97230ce..e408be47f65 100644 --- a/homeassistant/components/script/__init__.py +++ b/homeassistant/components/script/__init__.py @@ -7,6 +7,7 @@ import voluptuous as vol from homeassistant.const import ( ATTR_ENTITY_ID, + ATTR_MODE, ATTR_NAME, CONF_ALIAS, CONF_ICON, @@ -27,7 +28,6 @@ from homeassistant.helpers.entity_component import EntityComponent from homeassistant.helpers.script import ( ATTR_CUR, ATTR_MAX, - ATTR_MODE, CONF_MAX, CONF_MAX_EXCEEDED, SCRIPT_MODE_SINGLE, diff --git a/homeassistant/components/seventeentrack/sensor.py b/homeassistant/components/seventeentrack/sensor.py index fa94ca4e384..07cfe9ca66f 100644 --- a/homeassistant/components/seventeentrack/sensor.py +++ b/homeassistant/components/seventeentrack/sensor.py @@ -9,6 +9,7 @@ import voluptuous as vol from homeassistant.components.sensor import PLATFORM_SCHEMA from homeassistant.const import ( ATTR_ATTRIBUTION, + ATTR_FRIENDLY_NAME, ATTR_LOCATION, CONF_PASSWORD, CONF_SCAN_INTERVAL, @@ -22,7 +23,6 @@ from homeassistant.util import Throttle, slugify _LOGGER = logging.getLogger(__name__) ATTR_DESTINATION_COUNTRY = "destination_country" -ATTR_FRIENDLY_NAME = "friendly_name" ATTR_INFO_TEXT = "info_text" ATTR_ORIGIN_COUNTRY = "origin_country" ATTR_PACKAGES = "packages" diff --git a/homeassistant/components/shopping_list/__init__.py b/homeassistant/components/shopping_list/__init__.py index e438bf3b8f4..841865cd759 100644 --- a/homeassistant/components/shopping_list/__init__.py +++ b/homeassistant/components/shopping_list/__init__.py @@ -7,14 +7,13 @@ import voluptuous as vol from homeassistant import config_entries from homeassistant.components import http, websocket_api from homeassistant.components.http.data_validator import RequestDataValidator -from homeassistant.const import HTTP_BAD_REQUEST, HTTP_NOT_FOUND +from homeassistant.const import ATTR_NAME, HTTP_BAD_REQUEST, HTTP_NOT_FOUND from homeassistant.core import callback import homeassistant.helpers.config_validation as cv from homeassistant.util.json import load_json, save_json from .const import DOMAIN -ATTR_NAME = "name" ATTR_COMPLETE = "complete" _LOGGER = logging.getLogger(__name__) diff --git a/homeassistant/components/slack/notify.py b/homeassistant/components/slack/notify.py index fb7b949e3ed..f1e293773bd 100644 --- a/homeassistant/components/slack/notify.py +++ b/homeassistant/components/slack/notify.py @@ -20,7 +20,7 @@ from homeassistant.components.notify import ( PLATFORM_SCHEMA, BaseNotificationService, ) -from homeassistant.const import CONF_API_KEY, CONF_ICON, CONF_USERNAME +from homeassistant.const import ATTR_ICON, CONF_API_KEY, CONF_ICON, CONF_USERNAME from homeassistant.core import callback from homeassistant.helpers import aiohttp_client, config_validation as cv import homeassistant.helpers.template as template @@ -35,7 +35,6 @@ _LOGGER = logging.getLogger(__name__) ATTR_BLOCKS = "blocks" ATTR_BLOCKS_TEMPLATE = "blocks_template" ATTR_FILE = "file" -ATTR_ICON = "icon" ATTR_PASSWORD = "password" ATTR_PATH = "path" ATTR_URL = "url" diff --git a/homeassistant/components/spaceapi/__init__.py b/homeassistant/components/spaceapi/__init__.py index 571e0ab62f3..f6def03ec6a 100644 --- a/homeassistant/components/spaceapi/__init__.py +++ b/homeassistant/components/spaceapi/__init__.py @@ -6,6 +6,7 @@ from homeassistant.const import ( ATTR_ENTITY_ID, ATTR_ICON, ATTR_LOCATION, + ATTR_NAME, ATTR_STATE, ATTR_UNIT_OF_MEASUREMENT, CONF_ADDRESS, @@ -35,7 +36,6 @@ ATTR_CONTACT = "contact" ATTR_ISSUE_REPORT_CHANNELS = "issue_report_channels" ATTR_LASTCHANGE = "lastchange" ATTR_LOGO = "logo" -ATTR_NAME = "name" ATTR_OPEN = "open" ATTR_SENSORS = "sensors" ATTR_SPACE = "space" diff --git a/homeassistant/components/upb/__init__.py b/homeassistant/components/upb/__init__.py index 70f37451e6b..bf23be16af2 100644 --- a/homeassistant/components/upb/__init__.py +++ b/homeassistant/components/upb/__init__.py @@ -3,7 +3,7 @@ import asyncio import upb_lib -from homeassistant.const import CONF_FILE_PATH, CONF_HOST +from homeassistant.const import ATTR_COMMAND, CONF_FILE_PATH, CONF_HOST from homeassistant.core import HomeAssistant, callback from homeassistant.helpers.entity import Entity from homeassistant.helpers.typing import ConfigType @@ -11,7 +11,6 @@ from homeassistant.helpers.typing import ConfigType from .const import ( ATTR_ADDRESS, ATTR_BRIGHTNESS_PCT, - ATTR_COMMAND, ATTR_RATE, DOMAIN, EVENT_UPB_SCENE_CHANGED, diff --git a/homeassistant/components/upb/const.py b/homeassistant/components/upb/const.py index 75d754087e4..8a2c435a70f 100644 --- a/homeassistant/components/upb/const.py +++ b/homeassistant/components/upb/const.py @@ -10,7 +10,6 @@ ATTR_ADDRESS = "address" ATTR_BLINK_RATE = "blink_rate" ATTR_BRIGHTNESS = "brightness" ATTR_BRIGHTNESS_PCT = "brightness_pct" -ATTR_COMMAND = "command" ATTR_RATE = "rate" CONF_NETWORK = "network" EVENT_UPB_SCENE_CHANGED = "upb.scene_changed" diff --git a/homeassistant/components/upcloud/__init__.py b/homeassistant/components/upcloud/__init__.py index 5acf9e364bc..bb96ef0f1d6 100644 --- a/homeassistant/components/upcloud/__init__.py +++ b/homeassistant/components/upcloud/__init__.py @@ -40,7 +40,6 @@ _LOGGER = logging.getLogger(__name__) ATTR_CORE_NUMBER = "core_number" ATTR_HOSTNAME = "hostname" ATTR_MEMORY_AMOUNT = "memory_amount" -ATTR_STATE = "state" ATTR_TITLE = "title" ATTR_UUID = "uuid" ATTR_ZONE = "zone" diff --git a/homeassistant/components/vilfo/const.py b/homeassistant/components/vilfo/const.py index 74eb813bcc5..d47e738a858 100644 --- a/homeassistant/components/vilfo/const.py +++ b/homeassistant/components/vilfo/const.py @@ -1,13 +1,16 @@ """Constants for the Vilfo Router integration.""" -from homeassistant.const import DEVICE_CLASS_TIMESTAMP, PERCENTAGE +from homeassistant.const import ( + ATTR_DEVICE_CLASS, + ATTR_ICON, + DEVICE_CLASS_TIMESTAMP, + PERCENTAGE, +) DOMAIN = "vilfo" ATTR_API_DATA_FIELD = "api_data_field" ATTR_API_DATA_FIELD_LOAD = "load" ATTR_API_DATA_FIELD_BOOT_TIME = "boot_time" -ATTR_DEVICE_CLASS = "device_class" -ATTR_ICON = "icon" ATTR_LABEL = "label" ATTR_LOAD = "load" ATTR_UNIT = "unit" diff --git a/homeassistant/components/vilfo/sensor.py b/homeassistant/components/vilfo/sensor.py index e2909647c2d..80a14354913 100644 --- a/homeassistant/components/vilfo/sensor.py +++ b/homeassistant/components/vilfo/sensor.py @@ -1,10 +1,10 @@ """Support for Vilfo Router sensors.""" +from homeassistant.const import ATTR_ICON from homeassistant.helpers.entity import Entity from .const import ( ATTR_API_DATA_FIELD, ATTR_DEVICE_CLASS, - ATTR_ICON, ATTR_LABEL, ATTR_UNIT, DOMAIN, diff --git a/homeassistant/components/webostv/__init__.py b/homeassistant/components/webostv/__init__.py index ebac158c452..3a117955bee 100644 --- a/homeassistant/components/webostv/__init__.py +++ b/homeassistant/components/webostv/__init__.py @@ -6,20 +6,8 @@ from aiopylgtv import PyLGTVCmdException, PyLGTVPairException, WebOsClient import voluptuous as vol from websockets.exceptions import ConnectionClosed -from homeassistant.components.webostv.const import ( - ATTR_BUTTON, - ATTR_COMMAND, - ATTR_PAYLOAD, - CONF_ON_ACTION, - CONF_SOURCES, - DEFAULT_NAME, - DOMAIN, - SERVICE_BUTTON, - SERVICE_COMMAND, - SERVICE_SELECT_SOUND_OUTPUT, - WEBOSTV_CONFIG_FILE, -) from homeassistant.const import ( + ATTR_COMMAND, ATTR_ENTITY_ID, CONF_CUSTOMIZE, CONF_HOST, @@ -30,7 +18,19 @@ from homeassistant.const import ( import homeassistant.helpers.config_validation as cv from homeassistant.helpers.dispatcher import async_dispatcher_send -from .const import ATTR_SOUND_OUTPUT +from .const import ( + ATTR_BUTTON, + ATTR_PAYLOAD, + ATTR_SOUND_OUTPUT, + CONF_ON_ACTION, + CONF_SOURCES, + DEFAULT_NAME, + DOMAIN, + SERVICE_BUTTON, + SERVICE_COMMAND, + SERVICE_SELECT_SOUND_OUTPUT, + WEBOSTV_CONFIG_FILE, +) CUSTOMIZE_SCHEMA = vol.Schema( {vol.Optional(CONF_SOURCES, default=[]): vol.All(cv.ensure_list, [cv.string])} diff --git a/homeassistant/components/webostv/const.py b/homeassistant/components/webostv/const.py index bea485a7d68..9091491a29d 100644 --- a/homeassistant/components/webostv/const.py +++ b/homeassistant/components/webostv/const.py @@ -4,7 +4,6 @@ DOMAIN = "webostv" DEFAULT_NAME = "LG webOS Smart TV" ATTR_BUTTON = "button" -ATTR_COMMAND = "command" ATTR_PAYLOAD = "payload" ATTR_SOUND_OUTPUT = "sound_output" diff --git a/homeassistant/components/xiaomi_aqara/__init__.py b/homeassistant/components/xiaomi_aqara/__init__.py index a33f697abdf..53a9427d30a 100644 --- a/homeassistant/components/xiaomi_aqara/__init__.py +++ b/homeassistant/components/xiaomi_aqara/__init__.py @@ -9,6 +9,7 @@ from xiaomi_gateway import XiaomiGateway, XiaomiGatewayDiscovery from homeassistant import config_entries, core from homeassistant.const import ( ATTR_BATTERY_LEVEL, + ATTR_DEVICE_ID, ATTR_VOLTAGE, CONF_HOST, CONF_MAC, @@ -42,7 +43,6 @@ GATEWAY_PLATFORMS_NO_KEY = ["binary_sensor", "sensor"] ATTR_GW_MAC = "gw_mac" ATTR_RINGTONE_ID = "ringtone_id" ATTR_RINGTONE_VOL = "ringtone_vol" -ATTR_DEVICE_ID = "device_id" TIME_TILL_UNAVAILABLE = timedelta(minutes=150) diff --git a/homeassistant/components/xiaomi_miio/fan.py b/homeassistant/components/xiaomi_miio/fan.py index c8e200516a0..addb1a3cbca 100644 --- a/homeassistant/components/xiaomi_miio/fan.py +++ b/homeassistant/components/xiaomi_miio/fan.py @@ -47,6 +47,7 @@ from homeassistant.config_entries import SOURCE_IMPORT from homeassistant.const import ( ATTR_ENTITY_ID, ATTR_MODE, + ATTR_TEMPERATURE, CONF_HOST, CONF_NAME, CONF_TOKEN, @@ -112,7 +113,6 @@ PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend( ATTR_MODEL = "model" # Air Purifier -ATTR_TEMPERATURE = "temperature" ATTR_HUMIDITY = "humidity" ATTR_AIR_QUALITY_INDEX = "aqi" ATTR_FILTER_HOURS_USED = "filter_hours_used" diff --git a/homeassistant/components/xiaomi_miio/sensor.py b/homeassistant/components/xiaomi_miio/sensor.py index d6b87000f40..a7cfdd788a5 100644 --- a/homeassistant/components/xiaomi_miio/sensor.py +++ b/homeassistant/components/xiaomi_miio/sensor.py @@ -14,6 +14,7 @@ import voluptuous as vol from homeassistant.components.sensor import PLATFORM_SCHEMA from homeassistant.const import ( + ATTR_BATTERY_LEVEL, CONF_HOST, CONF_NAME, CONF_TOKEN, @@ -48,7 +49,6 @@ PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend( ATTR_POWER = "power" ATTR_CHARGING = "charging" -ATTR_BATTERY_LEVEL = "battery_level" ATTR_DISPLAY_CLOCK = "display_clock" ATTR_NIGHT_MODE = "night_mode" ATTR_NIGHT_TIME_BEGIN = "night_time_begin" diff --git a/homeassistant/components/xiaomi_miio/switch.py b/homeassistant/components/xiaomi_miio/switch.py index b290cc6a956..0a35e8e0a35 100644 --- a/homeassistant/components/xiaomi_miio/switch.py +++ b/homeassistant/components/xiaomi_miio/switch.py @@ -12,6 +12,7 @@ from homeassistant.config_entries import SOURCE_IMPORT from homeassistant.const import ( ATTR_ENTITY_ID, ATTR_MODE, + ATTR_TEMPERATURE, CONF_HOST, CONF_NAME, CONF_TOKEN, @@ -63,7 +64,6 @@ PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend( ) ATTR_POWER = "power" -ATTR_TEMPERATURE = "temperature" ATTR_LOAD_POWER = "load_power" ATTR_MODEL = "model" ATTR_POWER_MODE = "power_mode" diff --git a/homeassistant/components/zha/api.py b/homeassistant/components/zha/api.py index 2bd712ff681..45f7d540052 100644 --- a/homeassistant/components/zha/api.py +++ b/homeassistant/components/zha/api.py @@ -11,6 +11,7 @@ from zigpy.types.named import EUI64 import zigpy.zdo.types as zdo_types from homeassistant.components import websocket_api +from homeassistant.const import ATTR_COMMAND, ATTR_NAME from homeassistant.core import callback import homeassistant.helpers.config_validation as cv from homeassistant.helpers.dispatcher import async_dispatcher_connect @@ -20,14 +21,12 @@ from .core.const import ( ATTR_ATTRIBUTE, ATTR_CLUSTER_ID, ATTR_CLUSTER_TYPE, - ATTR_COMMAND, ATTR_COMMAND_TYPE, ATTR_ENDPOINT_ID, ATTR_IEEE, ATTR_LEVEL, ATTR_MANUFACTURER, ATTR_MEMBERS, - ATTR_NAME, ATTR_VALUE, ATTR_WARNING_DEVICE_DURATION, ATTR_WARNING_DEVICE_MODE, diff --git a/homeassistant/components/zha/core/channels/base.py b/homeassistant/components/zha/core/channels/base.py index 2dbd1629487..14774c09550 100644 --- a/homeassistant/components/zha/core/channels/base.py +++ b/homeassistant/components/zha/core/channels/base.py @@ -8,6 +8,7 @@ from typing import Any, Union import zigpy.exceptions +from homeassistant.const import ATTR_COMMAND from homeassistant.core import callback from .. import typing as zha_typing @@ -16,7 +17,6 @@ from ..const import ( ATTR_ATTRIBUTE_ID, ATTR_ATTRIBUTE_NAME, ATTR_CLUSTER_ID, - ATTR_COMMAND, ATTR_UNIQUE_ID, ATTR_VALUE, CHANNEL_ZDO, diff --git a/homeassistant/components/zha/core/const.py b/homeassistant/components/zha/core/const.py index 2454085d9a4..672fafdd98f 100644 --- a/homeassistant/components/zha/core/const.py +++ b/homeassistant/components/zha/core/const.py @@ -31,7 +31,6 @@ ATTR_ATTRIBUTE_NAME = "attribute_name" ATTR_AVAILABLE = "available" ATTR_CLUSTER_ID = "cluster_id" ATTR_CLUSTER_TYPE = "cluster_type" -ATTR_COMMAND = "command" ATTR_COMMAND_TYPE = "command_type" ATTR_DEVICE_IEEE = "device_ieee" ATTR_DEVICE_TYPE = "device_type" @@ -47,7 +46,6 @@ ATTR_MANUFACTURER = "manufacturer" ATTR_MANUFACTURER_CODE = "manufacturer_code" ATTR_MEMBERS = "members" ATTR_MODEL = "model" -ATTR_NAME = "name" ATTR_NEIGHBORS = "neighbors" ATTR_NODE_DESCRIPTOR = "node_descriptor" ATTR_NWK = "nwk" diff --git a/homeassistant/components/zha/core/device.py b/homeassistant/components/zha/core/device.py index cd3b1bd93ce..4f93a7a95d6 100644 --- a/homeassistant/components/zha/core/device.py +++ b/homeassistant/components/zha/core/device.py @@ -14,6 +14,7 @@ import zigpy.quirks from zigpy.zcl.clusters.general import Groups import zigpy.zdo.types as zdo_types +from homeassistant.const import ATTR_COMMAND, ATTR_NAME from homeassistant.core import callback from homeassistant.helpers.dispatcher import ( async_dispatcher_connect, @@ -28,7 +29,6 @@ from .const import ( ATTR_ATTRIBUTE, ATTR_AVAILABLE, ATTR_CLUSTER_ID, - ATTR_COMMAND, ATTR_COMMAND_TYPE, ATTR_DEVICE_TYPE, ATTR_ENDPOINT_ID, @@ -40,7 +40,6 @@ from .const import ( ATTR_MANUFACTURER, ATTR_MANUFACTURER_CODE, ATTR_MODEL, - ATTR_NAME, ATTR_NEIGHBORS, ATTR_NODE_DESCRIPTOR, ATTR_NWK, diff --git a/homeassistant/components/zha/entity.py b/homeassistant/components/zha/entity.py index db30e9e178c..3c8f0c59cb1 100644 --- a/homeassistant/components/zha/entity.py +++ b/homeassistant/components/zha/entity.py @@ -5,6 +5,7 @@ import functools import logging from typing import Any, Awaitable, Dict, List, Optional +from homeassistant.const import ATTR_NAME from homeassistant.core import CALLBACK_TYPE, Event, callback from homeassistant.helpers import entity from homeassistant.helpers.device_registry import CONNECTION_ZIGBEE @@ -18,7 +19,6 @@ from homeassistant.helpers.restore_state import RestoreEntity from .core.const import ( ATTR_MANUFACTURER, ATTR_MODEL, - ATTR_NAME, DATA_ZHA, DATA_ZHA_BRIDGE_ID, DOMAIN, diff --git a/homeassistant/components/zwave/__init__.py b/homeassistant/components/zwave/__init__.py index 0ab1f786555..649f17ff08f 100644 --- a/homeassistant/components/zwave/__init__.py +++ b/homeassistant/components/zwave/__init__.py @@ -11,6 +11,7 @@ import voluptuous as vol from homeassistant import config_entries from homeassistant.const import ( ATTR_ENTITY_ID, + ATTR_NAME, EVENT_HOMEASSISTANT_START, EVENT_HOMEASSISTANT_STOP, ) @@ -103,7 +104,7 @@ PLATFORMS = [ RENAME_NODE_SCHEMA = vol.Schema( { vol.Required(const.ATTR_NODE_ID): vol.Coerce(int), - vol.Required(const.ATTR_NAME): cv.string, + vol.Required(ATTR_NAME): cv.string, vol.Optional(const.ATTR_UPDATE_IDS, default=False): cv.boolean, } ) @@ -112,7 +113,7 @@ RENAME_VALUE_SCHEMA = vol.Schema( { vol.Required(const.ATTR_NODE_ID): vol.Coerce(int), vol.Required(const.ATTR_VALUE_ID): vol.Coerce(int), - vol.Required(const.ATTR_NAME): cv.string, + vol.Required(ATTR_NAME): cv.string, vol.Optional(const.ATTR_UPDATE_IDS, default=False): cv.boolean, } ) @@ -661,7 +662,7 @@ async def async_setup_entry(hass, config_entry): """Rename a node.""" node_id = service.data.get(const.ATTR_NODE_ID) node = network.nodes[node_id] # pylint: disable=unsubscriptable-object - name = service.data.get(const.ATTR_NAME) + name = service.data.get(ATTR_NAME) node.name = name _LOGGER.info("Renamed Z-Wave node %d to %s", node_id, name) update_ids = service.data.get(const.ATTR_UPDATE_IDS) @@ -682,7 +683,7 @@ async def async_setup_entry(hass, config_entry): value_id = service.data.get(const.ATTR_VALUE_ID) node = network.nodes[node_id] # pylint: disable=unsubscriptable-object value = node.values[value_id] - name = service.data.get(const.ATTR_NAME) + name = service.data.get(ATTR_NAME) value.label = name _LOGGER.info( "Renamed Z-Wave value (Node %d Value %d) to %s", node_id, value_id, name diff --git a/homeassistant/components/zwave/const.py b/homeassistant/components/zwave/const.py index 83fb43fd3fb..d11d308c490 100644 --- a/homeassistant/components/zwave/const.py +++ b/homeassistant/components/zwave/const.py @@ -8,7 +8,6 @@ ATTR_INSTANCE = "instance" ATTR_GROUP = "group" ATTR_VALUE_ID = "value_id" ATTR_MESSAGES = "messages" -ATTR_NAME = "name" ATTR_RETURN_ROUTES = "return_routes" ATTR_SCENE_ID = "scene_id" ATTR_SCENE_DATA = "scene_data" diff --git a/homeassistant/components/zwave_js/__init__.py b/homeassistant/components/zwave_js/__init__.py index 519771c1a49..2d4db960886 100644 --- a/homeassistant/components/zwave_js/__init__.py +++ b/homeassistant/components/zwave_js/__init__.py @@ -10,7 +10,12 @@ from zwave_js_server.model.notification import Notification from zwave_js_server.model.value import ValueNotification from homeassistant.config_entries import ConfigEntry -from homeassistant.const import ATTR_DOMAIN, CONF_URL, EVENT_HOMEASSISTANT_STOP +from homeassistant.const import ( + ATTR_DEVICE_ID, + ATTR_DOMAIN, + CONF_URL, + EVENT_HOMEASSISTANT_STOP, +) from homeassistant.core import Event, HomeAssistant, callback from homeassistant.exceptions import ConfigEntryNotReady from homeassistant.helpers import device_registry, entity_registry @@ -22,7 +27,6 @@ from .api import async_register_api from .const import ( ATTR_COMMAND_CLASS, ATTR_COMMAND_CLASS_NAME, - ATTR_DEVICE_ID, ATTR_ENDPOINT, ATTR_HOME_ID, ATTR_LABEL, diff --git a/homeassistant/components/zwave_js/const.py b/homeassistant/components/zwave_js/const.py index ffd6031349a..49beb06283e 100644 --- a/homeassistant/components/zwave_js/const.py +++ b/homeassistant/components/zwave_js/const.py @@ -38,7 +38,6 @@ ATTR_VALUE_RAW = "value_raw" ATTR_COMMAND_CLASS = "command_class" ATTR_COMMAND_CLASS_NAME = "command_class_name" ATTR_TYPE = "type" -ATTR_DEVICE_ID = "device_id" ATTR_PROPERTY_NAME = "property_name" ATTR_PROPERTY_KEY_NAME = "property_key_name" ATTR_PROPERTY = "property" diff --git a/homeassistant/helpers/script.py b/homeassistant/helpers/script.py index aaed10f7814..3925535d06b 100644 --- a/homeassistant/helpers/script.py +++ b/homeassistant/helpers/script.py @@ -112,7 +112,6 @@ DEFAULT_MAX_EXCEEDED = "WARNING" ATTR_CUR = "current" ATTR_MAX = "max" -ATTR_MODE = "mode" DATA_SCRIPTS = "helpers.script" diff --git a/tests/components/webostv/test_media_player.py b/tests/components/webostv/test_media_player.py index 70bc8274684..3015fcccf9f 100644 --- a/tests/components/webostv/test_media_player.py +++ b/tests/components/webostv/test_media_player.py @@ -12,13 +12,13 @@ from homeassistant.components.media_player.const import ( ) from homeassistant.components.webostv.const import ( ATTR_BUTTON, - ATTR_COMMAND, ATTR_PAYLOAD, DOMAIN, SERVICE_BUTTON, SERVICE_COMMAND, ) from homeassistant.const import ( + ATTR_COMMAND, ATTR_ENTITY_ID, CONF_HOST, CONF_NAME, diff --git a/tests/components/zha/test_api.py b/tests/components/zha/test_api.py index 363aa12db6e..8694b59ecfb 100644 --- a/tests/components/zha/test_api.py +++ b/tests/components/zha/test_api.py @@ -28,7 +28,6 @@ from homeassistant.components.zha.core.const import ( ATTR_IEEE, ATTR_MANUFACTURER, ATTR_MODEL, - ATTR_NAME, ATTR_NEIGHBORS, ATTR_QUIRK_APPLIED, CLUSTER_TYPE_IN, @@ -38,6 +37,7 @@ from homeassistant.components.zha.core.const import ( GROUP_IDS, GROUP_NAME, ) +from homeassistant.const import ATTR_NAME from homeassistant.core import Context from .conftest import FIXTURE_GRP_ID, FIXTURE_GRP_NAME diff --git a/tests/components/zwave/test_init.py b/tests/components/zwave/test_init.py index d70c3d631d5..d64e191e1f3 100644 --- a/tests/components/zwave/test_init.py +++ b/tests/components/zwave/test_init.py @@ -17,7 +17,7 @@ from homeassistant.components.zwave import ( const, ) from homeassistant.components.zwave.binary_sensor import get_device -from homeassistant.const import ATTR_ENTITY_ID +from homeassistant.const import ATTR_ENTITY_ID, ATTR_NAME from homeassistant.helpers.device_registry import async_get_registry as get_dev_reg from homeassistant.helpers.entity_registry import async_get_registry @@ -506,7 +506,7 @@ async def test_value_entities(hass, mock_openzwave): await hass.services.async_call( "zwave", "rename_node", - {const.ATTR_NODE_ID: node.node_id, const.ATTR_NAME: "Demo Node"}, + {const.ATTR_NODE_ID: node.node_id, ATTR_NAME: "Demo Node"}, ) await hass.async_block_till_done() @@ -537,7 +537,7 @@ async def test_value_entities(hass, mock_openzwave): { const.ATTR_NODE_ID: node.node_id, const.ATTR_UPDATE_IDS: True, - const.ATTR_NAME: "New Node", + ATTR_NAME: "New Node", }, ) await hass.async_block_till_done() @@ -568,7 +568,7 @@ async def test_value_entities(hass, mock_openzwave): const.ATTR_NODE_ID: node.node_id, const.ATTR_VALUE_ID: value.object_id, const.ATTR_UPDATE_IDS: True, - const.ATTR_NAME: "New Label", + ATTR_NAME: "New Label", }, ) await hass.async_block_till_done() @@ -1360,7 +1360,7 @@ async def test_rename_node(hass, mock_openzwave, zwave_setup_ready): await hass.services.async_call( "zwave", "rename_node", - {const.ATTR_NODE_ID: 11, const.ATTR_NAME: "test_name"}, + {const.ATTR_NODE_ID: 11, ATTR_NAME: "test_name"}, ) await hass.async_block_till_done() @@ -1383,7 +1383,7 @@ async def test_rename_value(hass, mock_openzwave, zwave_setup_ready): { const.ATTR_NODE_ID: 11, const.ATTR_VALUE_ID: 123456, - const.ATTR_NAME: "New Label", + ATTR_NAME: "New Label", }, ) await hass.async_block_till_done()