mirror of
https://github.com/home-assistant/core.git
synced 2026-09-01 02:34:44 -05:00
Remove duplicate constants for MQTT (#171359)
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user