Home Assistant Unofficial Reference 2024.12.1
homeassistant.components.mqtt.cover Namespace Reference

Classes

class  MqttCover
 

Functions

None async_setup_entry (HomeAssistant hass, ConfigEntry config_entry, AddEntitiesCallback async_add_entities)
 
ConfigType validate_options (ConfigType config)
 

Variables

 _LOGGER = logging.getLogger(__name__)
 
 _PLATFORM_SCHEMA_BASE
 
string CONF_GET_POSITION_TEMPLATE = "position_template"
 
string CONF_GET_POSITION_TOPIC = "position_topic"
 
string CONF_SET_POSITION_TEMPLATE = "set_position_template"
 
string CONF_SET_POSITION_TOPIC = "set_position_topic"
 
string CONF_STATE_STOPPED = "state_stopped"
 
string CONF_TILT_CLOSED_POSITION = "tilt_closed_value"
 
string CONF_TILT_COMMAND_TEMPLATE = "tilt_command_template"
 
string CONF_TILT_COMMAND_TOPIC = "tilt_command_topic"
 
string CONF_TILT_MAX = "tilt_max"
 
string CONF_TILT_MIN = "tilt_min"
 
string CONF_TILT_OPEN_POSITION = "tilt_opened_value"
 
string CONF_TILT_STATE_OPTIMISTIC = "tilt_optimistic"
 
string CONF_TILT_STATUS_TEMPLATE = "tilt_status_template"
 
string CONF_TILT_STATUS_TOPIC = "tilt_status_topic"
 
string COVER_PAYLOAD = "cover"
 
string DEFAULT_NAME = "MQTT Cover"
 
string DEFAULT_PAYLOAD_STOP = "STOP"
 
string DEFAULT_STATE_STOPPED = "stopped"
 
int DEFAULT_TILT_CLOSED_POSITION = 0
 
int DEFAULT_TILT_MAX = 100
 
int DEFAULT_TILT_MIN = 0
 
int DEFAULT_TILT_OPEN_POSITION = 100
 
bool DEFAULT_TILT_OPTIMISTIC = False
 
 DISCOVERY_SCHEMA
 
 MQTT_COVER_ATTRIBUTES_BLOCKED
 
int PARALLEL_UPDATES = 0
 
 PLATFORM_SCHEMA_MODERN
 
tuple TILT_FEATURES
 
string TILT_PAYLOAD = "tilt"
 

Detailed Description

Support for MQTT cover devices.

Function Documentation

◆ async_setup_entry()

None homeassistant.components.mqtt.cover.async_setup_entry ( HomeAssistant  hass,
ConfigEntry  config_entry,
AddEntitiesCallback  async_add_entities 
)
Set up MQTT cover through YAML and through MQTT discovery.

Definition at line 220 of file cover.py.

◆ validate_options()

ConfigType homeassistant.components.mqtt.cover.validate_options ( ConfigType  config)
Validate options.

If set position topic is set then get position topic is set as well.

Definition at line 119 of file cover.py.

Variable Documentation

◆ _LOGGER

homeassistant.components.mqtt.cover._LOGGER = logging.getLogger(__name__)
private

Definition at line 70 of file cover.py.

◆ _PLATFORM_SCHEMA_BASE

homeassistant.components.mqtt.cover._PLATFORM_SCHEMA_BASE
private

Definition at line 164 of file cover.py.

◆ CONF_GET_POSITION_TEMPLATE

string homeassistant.components.mqtt.cover.CONF_GET_POSITION_TEMPLATE = "position_template"

Definition at line 75 of file cover.py.

◆ CONF_GET_POSITION_TOPIC

string homeassistant.components.mqtt.cover.CONF_GET_POSITION_TOPIC = "position_topic"

Definition at line 74 of file cover.py.

◆ CONF_SET_POSITION_TEMPLATE

string homeassistant.components.mqtt.cover.CONF_SET_POSITION_TEMPLATE = "set_position_template"

Definition at line 77 of file cover.py.

◆ CONF_SET_POSITION_TOPIC

string homeassistant.components.mqtt.cover.CONF_SET_POSITION_TOPIC = "set_position_topic"

Definition at line 76 of file cover.py.

◆ CONF_STATE_STOPPED

string homeassistant.components.mqtt.cover.CONF_STATE_STOPPED = "state_stopped"

Definition at line 83 of file cover.py.

◆ CONF_TILT_CLOSED_POSITION

string homeassistant.components.mqtt.cover.CONF_TILT_CLOSED_POSITION = "tilt_closed_value"

Definition at line 84 of file cover.py.

◆ CONF_TILT_COMMAND_TEMPLATE

string homeassistant.components.mqtt.cover.CONF_TILT_COMMAND_TEMPLATE = "tilt_command_template"

Definition at line 79 of file cover.py.

◆ CONF_TILT_COMMAND_TOPIC

string homeassistant.components.mqtt.cover.CONF_TILT_COMMAND_TOPIC = "tilt_command_topic"

Definition at line 78 of file cover.py.

◆ CONF_TILT_MAX

string homeassistant.components.mqtt.cover.CONF_TILT_MAX = "tilt_max"

Definition at line 85 of file cover.py.

◆ CONF_TILT_MIN

string homeassistant.components.mqtt.cover.CONF_TILT_MIN = "tilt_min"

Definition at line 86 of file cover.py.

◆ CONF_TILT_OPEN_POSITION

string homeassistant.components.mqtt.cover.CONF_TILT_OPEN_POSITION = "tilt_opened_value"

Definition at line 87 of file cover.py.

◆ CONF_TILT_STATE_OPTIMISTIC

string homeassistant.components.mqtt.cover.CONF_TILT_STATE_OPTIMISTIC = "tilt_optimistic"

Definition at line 88 of file cover.py.

◆ CONF_TILT_STATUS_TEMPLATE

string homeassistant.components.mqtt.cover.CONF_TILT_STATUS_TEMPLATE = "tilt_status_template"

Definition at line 81 of file cover.py.

◆ CONF_TILT_STATUS_TOPIC

string homeassistant.components.mqtt.cover.CONF_TILT_STATUS_TOPIC = "tilt_status_topic"

Definition at line 80 of file cover.py.

◆ COVER_PAYLOAD

string homeassistant.components.mqtt.cover.COVER_PAYLOAD = "cover"

Definition at line 91 of file cover.py.

◆ DEFAULT_NAME

string homeassistant.components.mqtt.cover.DEFAULT_NAME = "MQTT Cover"

Definition at line 93 of file cover.py.

◆ DEFAULT_PAYLOAD_STOP

string homeassistant.components.mqtt.cover.DEFAULT_PAYLOAD_STOP = "STOP"

Definition at line 96 of file cover.py.

◆ DEFAULT_STATE_STOPPED

string homeassistant.components.mqtt.cover.DEFAULT_STATE_STOPPED = "stopped"

Definition at line 95 of file cover.py.

◆ DEFAULT_TILT_CLOSED_POSITION

int homeassistant.components.mqtt.cover.DEFAULT_TILT_CLOSED_POSITION = 0

Definition at line 98 of file cover.py.

◆ DEFAULT_TILT_MAX

int homeassistant.components.mqtt.cover.DEFAULT_TILT_MAX = 100

Definition at line 99 of file cover.py.

◆ DEFAULT_TILT_MIN

int homeassistant.components.mqtt.cover.DEFAULT_TILT_MIN = 0

Definition at line 100 of file cover.py.

◆ DEFAULT_TILT_OPEN_POSITION

int homeassistant.components.mqtt.cover.DEFAULT_TILT_OPEN_POSITION = 100

Definition at line 101 of file cover.py.

◆ DEFAULT_TILT_OPTIMISTIC

bool homeassistant.components.mqtt.cover.DEFAULT_TILT_OPTIMISTIC = False

Definition at line 102 of file cover.py.

◆ DISCOVERY_SCHEMA

homeassistant.components.mqtt.cover.DISCOVERY_SCHEMA
Initial value:
1 = vol.All(
2  _PLATFORM_SCHEMA_BASE.extend({}, extra=vol.REMOVE_EXTRA),
3  validate_options,
4 )

Definition at line 214 of file cover.py.

◆ MQTT_COVER_ATTRIBUTES_BLOCKED

homeassistant.components.mqtt.cover.MQTT_COVER_ATTRIBUTES_BLOCKED
Initial value:
1 = frozenset(
2  {
3  cover.ATTR_CURRENT_POSITION,
4  cover.ATTR_CURRENT_TILT_POSITION,
5  }
6 )

Definition at line 111 of file cover.py.

◆ PARALLEL_UPDATES

int homeassistant.components.mqtt.cover.PARALLEL_UPDATES = 0

Definition at line 72 of file cover.py.

◆ PLATFORM_SCHEMA_MODERN

homeassistant.components.mqtt.cover.PLATFORM_SCHEMA_MODERN
Initial value:
1 = vol.All(
2  _PLATFORM_SCHEMA_BASE,
3  validate_options,
4 )

Definition at line 209 of file cover.py.

◆ TILT_FEATURES

tuple homeassistant.components.mqtt.cover.TILT_FEATURES
Initial value:
1 = (
2  CoverEntityFeature.OPEN_TILT
3  | CoverEntityFeature.CLOSE_TILT
4  | CoverEntityFeature.STOP_TILT
5  | CoverEntityFeature.SET_TILT_POSITION
6 )

Definition at line 104 of file cover.py.

◆ TILT_PAYLOAD

string homeassistant.components.mqtt.cover.TILT_PAYLOAD = "tilt"

Definition at line 90 of file cover.py.