|
ESPHome 2026.2.1
|
Data Structures | |
| struct | Availability |
| Simple data struct for Home Assistant component availability. More... | |
| class | CustomMQTTDevice |
| This class is a helper class for custom components that communicate using MQTT. More... | |
| struct | Event |
| class | MQTTAlarmControlPanelComponent |
| class | MQTTBackend |
| class | MQTTBackendESP32 |
| class | MQTTBackendESP8266 |
| class | MQTTBackendLibreTiny |
| class | MQTTBinarySensorComponent |
| class | MQTTButtonComponent |
| class | MQTTClientComponent |
| class | MQTTClimateComponent |
| class | MQTTComponent |
| MQTTComponent is the base class for all components that interact with MQTT to expose certain functionality or data from actuators or sensors to clients. More... | |
| class | MQTTConnectedCondition |
| class | MQTTConnectTrigger |
| class | MQTTCoverComponent |
| struct | MQTTCredentials |
| internal struct for MQTT credentials. More... | |
| class | MQTTDateComponent |
| class | MQTTDateTimeComponent |
| class | MQTTDisableAction |
| class | MQTTDisconnectTrigger |
| struct | MQTTDiscoveryInfo |
| Internal struct for MQTT Home Assistant discovery. More... | |
| class | MQTTEnableAction |
| class | MQTTEventComponent |
| class | MQTTFanComponent |
| class | MQTTJSONLightComponent |
| class | MQTTJsonMessageTrigger |
| class | MQTTLockComponent |
| struct | MQTTMessage |
| internal struct for MQTT messages. More... | |
| class | MQTTMessageTrigger |
| class | MQTTNumberComponent |
| class | MQTTPublishAction |
| class | MQTTPublishJsonAction |
| class | MQTTSelectComponent |
| class | MQTTSensorComponent |
| struct | MQTTSubscription |
| internal struct for MQTT subscriptions. More... | |
| class | MQTTSwitchComponent |
| class | MQTTTextComponent |
| class | MQTTTextSensor |
| class | MQTTTimeComponent |
| class | MQTTUpdateComponent |
| class | MQTTValveComponent |
| struct | QueueElement |
| struct | SendDiscoveryConfig |
| Simple Helper struct used for Home Assistant MQTT send_discovery(). More... | |
Typedefs | |
| using | mqtt_on_connect_callback_t = std::function<MQTTBackend::on_connect_callback_t> |
| Callback for MQTT events. | |
| using | mqtt_on_disconnect_callback_t = std::function<MQTTBackend::on_disconnect_callback_t> |
| using | mqtt_callback_t = std::function<void(const std::string &, const std::string &)> |
| Callback for MQTT subscriptions. | |
| using | mqtt_json_callback_t = std::function<void(const std::string &, JsonObject)> |
Enumerations | |
| enum class | MQTTClientDisconnectReason : int8_t { TCP_DISCONNECTED = 0 , MQTT_UNACCEPTABLE_PROTOCOL_VERSION = 1 , MQTT_IDENTIFIER_REJECTED = 2 , MQTT_SERVER_UNAVAILABLE = 3 , MQTT_MALFORMED_CREDENTIALS = 4 , MQTT_NOT_AUTHORIZED = 5 , ESP8266_NOT_ENOUGH_SPACE = 6 , TLS_BAD_FINGERPRINT = 7 , DNS_RESOLVE_ERROR = 8 } |
| enum | MqttQueueTypeT : uint8_t { MQTT_QUEUE_TYPE_NONE = 0 , MQTT_QUEUE_TYPE_SUBSCRIBE , MQTT_QUEUE_TYPE_UNSUBSCRIBE , MQTT_QUEUE_TYPE_PUBLISH } |
| enum | MQTTDiscoveryUniqueIdGenerator { MQTT_LEGACY_UNIQUE_ID_GENERATOR = 0 , MQTT_MAC_ADDRESS_UNIQUE_ID_GENERATOR } |
| available discovery unique_id generators More... | |
| enum | MQTTDiscoveryObjectIdGenerator { MQTT_NONE_OBJECT_ID_GENERATOR = 0 , MQTT_DEVICE_NAME_OBJECT_ID_GENERATOR } |
| available discovery object_id generators More... | |
| enum | MQTTClientState { MQTT_CLIENT_DISABLED = 0 , MQTT_CLIENT_DISCONNECTED , MQTT_CLIENT_RESOLVING_ADDRESS , MQTT_CLIENT_CONNECTING , MQTT_CLIENT_CONNECTED } |
Functions | |
| PROGMEM_STRING_TABLE (AlarmMqttStateStrings, "disarmed", "armed_home", "armed_away", "armed_night", "armed_vacation", "armed_custom_bypass", "pending", "arming", "disarming", "triggered", "unknown") | |
| MQTT_COMPONENT_TYPE (MQTTAlarmControlPanelComponent, "alarm_control_panel") const EntityBase *MQTTAlarmControlPanelComponent | |
| MQTT_COMPONENT_TYPE (MQTTBinarySensorComponent, "binary_sensor") const EntityBase *MQTTBinarySensorComponent | |
| PROGMEM_STRING_TABLE (ClimateMqttModeStrings, "off", "heat_cool", "cool", "heat", "fan_only", "dry", "auto", "unknown") | |
| PROGMEM_STRING_TABLE (ClimateMqttActionStrings, "off", "unknown", "cooling", "heating", "idle", "drying", "fan", "unknown") | |
| PROGMEM_STRING_TABLE (ClimateMqttFanModeStrings, "on", "off", "auto", "low", "medium", "high", "middle", "focus", "diffuse", "quiet", "unknown") | |
| PROGMEM_STRING_TABLE (ClimateMqttSwingModeStrings, "off", "both", "vertical", "horizontal", "unknown") | |
| PROGMEM_STRING_TABLE (ClimateMqttPresetStrings, "none", "home", "away", "boost", "comfort", "eco", "sleep", "activity", "unknown") | |
| MQTT_COMPONENT_TYPE (MQTTClimateComponent, "climate") const EntityBase *MQTTClimateComponent | |
| PROGMEM_STRING_TABLE (EntityCategoryMqttStrings, "", "config", "diagnostic") | |
| char * | append_str (char *p, const char *s, size_t len) |
| char * | append_char (char *p, char c) |
| void | log_mqtt_component (const char *tag, MQTTComponent *obj, bool state_topic, bool command_topic) |
| MQTT_COMPONENT_TYPE (MQTTCoverComponent, "cover") const EntityBase *MQTTCoverComponent | |
| MQTT_COMPONENT_TYPE (MQTTDateComponent, "date") const EntityBase *MQTTDateComponent | |
| MQTT_COMPONENT_TYPE (MQTTDateTimeComponent, "datetime") const EntityBase *MQTTDateTimeComponent | |
| MQTT_COMPONENT_TYPE (MQTTFanComponent, "fan") const EntityBase *MQTTFanComponent | |
| MQTT_COMPONENT_TYPE (MQTTJSONLightComponent, "light") const EntityBase *MQTTJSONLightComponent | |
| MQTT_COMPONENT_TYPE (MQTTLockComponent, "lock") const EntityBase *MQTTLockComponent | |
| PROGMEM_STRING_TABLE (NumberMqttModeStrings, "", "box", "slider") | |
| MQTT_COMPONENT_TYPE (MQTTNumberComponent, "number") const EntityBase *MQTTNumberComponent | |
| MQTT_COMPONENT_TYPE (MQTTSelectComponent, "select") const EntityBase *MQTTSelectComponent | |
| MQTT_COMPONENT_TYPE (MQTTSensorComponent, "sensor") const EntityBase *MQTTSensorComponent | |
| MQTT_COMPONENT_TYPE (MQTTSwitchComponent, "switch") const EntityBase *MQTTSwitchComponent | |
| PROGMEM_STRING_TABLE (TextMqttModeStrings, "text", "password") | |
| MQTT_COMPONENT_TYPE (MQTTTextComponent, "text") const EntityBase *MQTTTextComponent | |
| MQTT_COMPONENT_TYPE (MQTTTimeComponent, "time") const EntityBase *MQTTTimeComponent | |
| MQTT_COMPONENT_TYPE (MQTTValveComponent, "valve") const EntityBase *MQTTValveComponent | |
Variables | |
| MQTTClientComponent * | global_mqtt_client |
| using esphome::mqtt::mqtt_callback_t = std::function<void(const std::string &, const std::string &)> |
Callback for MQTT subscriptions.
First parameter is the topic, the second one is the payload.
Definition at line 38 of file mqtt_client.h.
| using esphome::mqtt::mqtt_json_callback_t = std::function<void(const std::string &, JsonObject)> |
Definition at line 39 of file mqtt_client.h.
| using esphome::mqtt::mqtt_on_connect_callback_t = std::function<MQTTBackend::on_connect_callback_t> |
Callback for MQTT events.
Definition at line 31 of file mqtt_client.h.
| using esphome::mqtt::mqtt_on_disconnect_callback_t = std::function<MQTTBackend::on_disconnect_callback_t> |
Definition at line 32 of file mqtt_client.h.
|
strong |
Definition at line 11 of file mqtt_backend.h.
| Enumerator | |
|---|---|
| MQTT_CLIENT_DISABLED | |
| MQTT_CLIENT_DISCONNECTED | |
| MQTT_CLIENT_RESOLVING_ADDRESS | |
| MQTT_CLIENT_CONNECTING | |
| MQTT_CLIENT_CONNECTED | |
Definition at line 92 of file mqtt_client.h.
available discovery object_id generators
| Enumerator | |
|---|---|
| MQTT_NONE_OBJECT_ID_GENERATOR | |
| MQTT_DEVICE_NAME_OBJECT_ID_GENERATOR | |
Definition at line 74 of file mqtt_client.h.
available discovery unique_id generators
| Enumerator | |
|---|---|
| MQTT_LEGACY_UNIQUE_ID_GENERATOR | |
| MQTT_MAC_ADDRESS_UNIQUE_ID_GENERATOR | |
Definition at line 68 of file mqtt_client.h.
| enum esphome::mqtt::MqttQueueTypeT : uint8_t |
| Enumerator | |
|---|---|
| MQTT_QUEUE_TYPE_NONE | |
| MQTT_QUEUE_TYPE_SUBSCRIBE | |
| MQTT_QUEUE_TYPE_UNSUBSCRIBE | |
| MQTT_QUEUE_TYPE_PUBLISH | |
Definition at line 49 of file mqtt_backend_esp32.h.
|
inline |
Definition at line 26 of file mqtt_component.cpp.
|
inline |
Definition at line 21 of file mqtt_component.cpp.
| void esphome::mqtt::log_mqtt_component | ( | const char * | tag, |
| MQTTComponent * | obj, | ||
| bool | state_topic, | ||
| bool | command_topic ) |
Definition at line 40 of file mqtt_component.cpp.
| esphome::mqtt::MQTT_COMPONENT_TYPE | ( | MQTTAlarmControlPanelComponent | , |
| "alarm_control_panel" | ) const |
Definition at line 91 of file mqtt_alarm_control_panel.cpp.
| esphome::mqtt::MQTT_COMPONENT_TYPE | ( | MQTTBinarySensorComponent | , |
| "binary_sensor" | ) const |
Definition at line 13 of file mqtt_binary_sensor.cpp.
| esphome::mqtt::MQTT_COMPONENT_TYPE | ( | MQTTClimateComponent | , |
| "climate" | ) const |
Definition at line 298 of file mqtt_climate.cpp.
| esphome::mqtt::MQTT_COMPONENT_TYPE | ( | MQTTCoverComponent | , |
| "cover" | ) const |
Definition at line 137 of file mqtt_cover.cpp.
| esphome::mqtt::MQTT_COMPONENT_TYPE | ( | MQTTDateComponent | , |
| "date" | ) const |
Definition at line 42 of file mqtt_date.cpp.
| esphome::mqtt::MQTT_COMPONENT_TYPE | ( | MQTTDateTimeComponent | , |
| "datetime" | ) const |
Definition at line 53 of file mqtt_datetime.cpp.
| esphome::mqtt::MQTT_COMPONENT_TYPE | ( | MQTTFanComponent | , |
| "fan" | ) const |
Definition at line 27 of file mqtt_fan.cpp.
| esphome::mqtt::MQTT_COMPONENT_TYPE | ( | MQTTJSONLightComponent | , |
| "light" | ) const |
Definition at line 17 of file mqtt_light.cpp.
| esphome::mqtt::MQTT_COMPONENT_TYPE | ( | MQTTLockComponent | , |
| "lock" | ) const |
Definition at line 38 of file mqtt_lock.cpp.
| esphome::mqtt::MQTT_COMPONENT_TYPE | ( | MQTTNumberComponent | , |
| "number" | ) const |
Definition at line 40 of file mqtt_number.cpp.
| esphome::mqtt::MQTT_COMPONENT_TYPE | ( | MQTTSelectComponent | , |
| "select" | ) const |
Definition at line 31 of file mqtt_select.cpp.
| esphome::mqtt::MQTT_COMPONENT_TYPE | ( | MQTTSensorComponent | , |
| "sensor" | ) const |
Definition at line 34 of file mqtt_sensor.cpp.
| esphome::mqtt::MQTT_COMPONENT_TYPE | ( | MQTTSwitchComponent | , |
| "switch" | ) const |
Definition at line 44 of file mqtt_switch.cpp.
| esphome::mqtt::MQTT_COMPONENT_TYPE | ( | MQTTTextComponent | , |
| "text" | ) const |
Definition at line 36 of file mqtt_text.cpp.
| esphome::mqtt::MQTT_COMPONENT_TYPE | ( | MQTTTimeComponent | , |
| "time" | ) const |
Definition at line 42 of file mqtt_time.cpp.
| esphome::mqtt::MQTT_COMPONENT_TYPE | ( | MQTTValveComponent | , |
| "valve" | ) const |
Definition at line 83 of file mqtt_valve.cpp.
| esphome::mqtt::PROGMEM_STRING_TABLE | ( | AlarmMqttStateStrings | , |
| "disarmed" | , | ||
| "armed_home" | , | ||
| "armed_away" | , | ||
| "armed_night" | , | ||
| "armed_vacation" | , | ||
| "armed_custom_bypass" | , | ||
| "pending" | , | ||
| "arming" | , | ||
| "disarming" | , | ||
| "triggered" | , | ||
| "unknown" | ) |
| esphome::mqtt::PROGMEM_STRING_TABLE | ( | ClimateMqttActionStrings | , |
| "off" | , | ||
| "unknown" | , | ||
| "cooling" | , | ||
| "heating" | , | ||
| "idle" | , | ||
| "drying" | , | ||
| "fan" | , | ||
| "unknown" | ) |
| esphome::mqtt::PROGMEM_STRING_TABLE | ( | ClimateMqttFanModeStrings | , |
| "on" | , | ||
| "off" | , | ||
| "auto" | , | ||
| "low" | , | ||
| "medium" | , | ||
| "high" | , | ||
| "middle" | , | ||
| "focus" | , | ||
| "diffuse" | , | ||
| "quiet" | , | ||
| "unknown" | ) |
| esphome::mqtt::PROGMEM_STRING_TABLE | ( | ClimateMqttModeStrings | , |
| "off" | , | ||
| "heat_cool" | , | ||
| "cool" | , | ||
| "heat" | , | ||
| "fan_only" | , | ||
| "dry" | , | ||
| "auto" | , | ||
| "unknown" | ) |
| esphome::mqtt::PROGMEM_STRING_TABLE | ( | ClimateMqttPresetStrings | , |
| "none" | , | ||
| "home" | , | ||
| "away" | , | ||
| "boost" | , | ||
| "comfort" | , | ||
| "eco" | , | ||
| "sleep" | , | ||
| "activity" | , | ||
| "unknown" | ) |
| esphome::mqtt::PROGMEM_STRING_TABLE | ( | ClimateMqttSwingModeStrings | , |
| "off" | , | ||
| "both" | , | ||
| "vertical" | , | ||
| "horizontal" | , | ||
| "unknown" | ) |
| esphome::mqtt::PROGMEM_STRING_TABLE | ( | EntityCategoryMqttStrings | , |
| "" | , | ||
| "config" | , | ||
| "diagnostic" | ) |
| esphome::mqtt::PROGMEM_STRING_TABLE | ( | NumberMqttModeStrings | , |
| "" | , | ||
| "box" | , | ||
| "slider" | ) |
| esphome::mqtt::PROGMEM_STRING_TABLE | ( | TextMqttModeStrings | , |
| "text" | , | ||
| "password" | ) |
|
extern |