diff --git a/homeassistant/components/mqtt/config_flow.py b/homeassistant/components/mqtt/config_flow.py index a7bd8e33670a..45cf18ab6523 100644 --- a/homeassistant/components/mqtt/config_flow.py +++ b/homeassistant/components/mqtt/config_flow.py @@ -91,6 +91,7 @@ from homeassistant.const import ( CONF_MODE, CONF_NAME, CONF_OPTIMISTIC, + CONF_OPTIONS, CONF_PASSWORD, CONF_PAYLOAD, CONF_PAYLOAD_OFF, @@ -235,7 +236,6 @@ from .const import ( CONF_MODE_STATE_TOPIC, CONF_OFF_DELAY, CONF_ON_COMMAND_TYPE, - CONF_OPTIONS, CONF_OSCILLATION_COMMAND_TEMPLATE, CONF_OSCILLATION_COMMAND_TOPIC, CONF_OSCILLATION_STATE_TOPIC, diff --git a/homeassistant/components/mqtt/const.py b/homeassistant/components/mqtt/const.py index 98cb304392b6..76ab70a95e04 100644 --- a/homeassistant/components/mqtt/const.py +++ b/homeassistant/components/mqtt/const.py @@ -15,8 +15,6 @@ ATTR_MESSAGE_EXPIRY_INTERVAL = "message_expiry_interval" ATTR_PAYLOAD = "payload" ATTR_QOS = "qos" ATTR_RETAIN = "retain" -# pylint: disable-next=home-assistant-duplicate-const -ATTR_SERIAL_NUMBER = "serial_number" ATTR_TOPIC = "topic" AVAILABILITY_ALL = "all" @@ -51,8 +49,6 @@ CONF_IMAGE_TOPIC = "image_topic" CONF_JSON_ATTRS_TOPIC = "json_attributes_topic" CONF_JSON_ATTRS_TEMPLATE = "json_attributes_template" CONF_KEEPALIVE = "keepalive" -# pylint: disable-next=home-assistant-duplicate-const -CONF_OPTIONS = "options" CONF_ORIGIN = "origin" CONF_QOS = ATTR_QOS CONF_RETAIN = ATTR_RETAIN diff --git a/homeassistant/components/mqtt/humidifier.py b/homeassistant/components/mqtt/humidifier.py index 003aef0f1c42..952f8cad3e30 100644 --- a/homeassistant/components/mqtt/humidifier.py +++ b/homeassistant/components/mqtt/humidifier.py @@ -21,6 +21,7 @@ from homeassistant.components.humidifier import ( ) from homeassistant.config_entries import ConfigEntry from homeassistant.const import ( + CONF_DEVICE_CLASS, CONF_NAME, CONF_OPTIMISTIC, CONF_PAYLOAD_OFF, @@ -60,8 +61,6 @@ from .util import valid_publish_topic, valid_subscribe_topic PARALLEL_UPDATES = 0 CONF_AVAILABLE_MODES_LIST = "modes" -# pylint: disable-next=home-assistant-duplicate-const -CONF_DEVICE_CLASS = "device_class" CONF_MODE_COMMAND_TEMPLATE = "mode_command_template" CONF_MODE_COMMAND_TOPIC = "mode_command_topic" CONF_MODE_STATE_TOPIC = "mode_state_topic" diff --git a/homeassistant/components/mqtt/select.py b/homeassistant/components/mqtt/select.py index f65181dcee07..bc7c2ba71d63 100644 --- a/homeassistant/components/mqtt/select.py +++ b/homeassistant/components/mqtt/select.py @@ -8,7 +8,12 @@ import voluptuous as vol from homeassistant.components import select from homeassistant.components.select import SelectEntity from homeassistant.config_entries import ConfigEntry -from homeassistant.const import CONF_NAME, CONF_OPTIMISTIC, CONF_VALUE_TEMPLATE +from homeassistant.const import ( + CONF_NAME, + CONF_OPTIMISTIC, + CONF_OPTIONS, + CONF_VALUE_TEMPLATE, +) from homeassistant.core import HomeAssistant, callback from homeassistant.helpers import config_validation as cv from homeassistant.helpers.entity_platform import AddConfigEntryEntitiesCallback @@ -18,12 +23,7 @@ from homeassistant.helpers.typing import ConfigType, VolSchemaType from . import subscription from .config import MQTT_RW_SCHEMA -from .const import ( - CONF_COMMAND_TEMPLATE, - CONF_COMMAND_TOPIC, - CONF_OPTIONS, - CONF_STATE_TOPIC, -) +from .const import CONF_COMMAND_TEMPLATE, CONF_COMMAND_TOPIC, CONF_STATE_TOPIC from .entity import MqttEntity, async_setup_entity_entry_helper from .models import ( MqttCommandTemplate, diff --git a/homeassistant/components/mqtt/sensor.py b/homeassistant/components/mqtt/sensor.py index 7e1e2f1b8762..cb75d2e2ca20 100644 --- a/homeassistant/components/mqtt/sensor.py +++ b/homeassistant/components/mqtt/sensor.py @@ -25,6 +25,7 @@ from homeassistant.const import ( CONF_DEVICE_CLASS, CONF_FORCE_UPDATE, CONF_NAME, + CONF_OPTIONS, CONF_UNIT_OF_MEASUREMENT, CONF_VALUE_TEMPLATE, STATE_UNAVAILABLE, @@ -43,7 +44,6 @@ from .config import MQTT_RO_SCHEMA from .const import ( CONF_EXPIRE_AFTER, CONF_LAST_RESET_VALUE_TEMPLATE, - CONF_OPTIONS, CONF_STATE_TOPIC, CONF_SUGGESTED_DISPLAY_PRECISION, PAYLOAD_NONE, diff --git a/homeassistant/components/mqtt/vacuum.py b/homeassistant/components/mqtt/vacuum.py index f24150a647ab..9501754455bf 100644 --- a/homeassistant/components/mqtt/vacuum.py +++ b/homeassistant/components/mqtt/vacuum.py @@ -14,7 +14,13 @@ from homeassistant.components.vacuum import ( VacuumEntityFeature, ) from homeassistant.config_entries import ConfigEntry -from homeassistant.const import ATTR_SUPPORTED_FEATURES, CONF_NAME, CONF_UNIQUE_ID +from homeassistant.const import ( + ATTR_SUPPORTED_FEATURES, + CONF_NAME, + CONF_UNIQUE_ID, + STATE_IDLE, + STATE_PAUSED, +) from homeassistant.core import HomeAssistant, callback from homeassistant.helpers import config_validation as cv from homeassistant.helpers.entity_platform import AddConfigEntryEntitiesCallback @@ -36,12 +42,8 @@ FAN_SPEED = "fan_speed" SEGMENTS = "segments" STATE = "state" -# pylint: disable-next=home-assistant-duplicate-const -STATE_IDLE = "idle" STATE_DOCKED = "docked" STATE_ERROR = "error" -# pylint: disable-next=home-assistant-duplicate-const -STATE_PAUSED = "paused" STATE_RETURNING = "returning" STATE_CLEANING = "cleaning"