ESPHome  1.15.2
Data Structures | Typedefs | Enumerations | Variables
esphome::mqtt Namespace Reference

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...
 
class  MQTTBinarySensorComponent
 
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  MQTTCoverComponent
 
struct  MQTTCredentials
 internal struct for MQTT credentials. More...
 
struct  MQTTDiscoveryInfo
 Internal struct for MQTT Home Assistant discovery. More...
 
class  MQTTFanComponent
 
class  MQTTJSONLightComponent
 
class  MQTTJsonMessageTrigger
 
struct  MQTTMessage
 internal struct for MQTT messages. More...
 
class  MQTTMessageTrigger
 
class  MQTTPublishAction
 
class  MQTTPublishJsonAction
 
class  MQTTSensorComponent
 
struct  MQTTSubscription
 internal struct for MQTT subscriptions. More...
 
class  MQTTSwitchComponent
 
class  MQTTTextSensor
 
struct  SendDiscoveryConfig
 Simple Helper struct used for Home Assistant MQTT send_discovery(). More...
 

Typedefs

using mqtt_callback_t = std::function< void(const std::string &, const std::string &)>
 Callback for MQTT subscriptions. More...
 
using mqtt_json_callback_t = std::function< void(const std::string &, JsonObject &)>
 

Enumerations

enum  MQTTClientState { MQTT_CLIENT_DISCONNECTED = 0, MQTT_CLIENT_RESOLVING_ADDRESS, MQTT_CLIENT_CONNECTING, MQTT_CLIENT_CONNECTED }
 

Variables

MQTTClientComponentglobal_mqtt_client
 

Typedef Documentation

◆ mqtt_callback_t

using esphome::mqtt::mqtt_callback_t = typedef 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 18 of file mqtt_client.h.

◆ mqtt_json_callback_t

using esphome::mqtt::mqtt_json_callback_t = typedef std::function<void(const std::string &, JsonObject &)>

Definition at line 19 of file mqtt_client.h.

Enumeration Type Documentation

◆ MQTTClientState

Enumerator
MQTT_CLIENT_DISCONNECTED 
MQTT_CLIENT_RESOLVING_ADDRESS 
MQTT_CLIENT_CONNECTING 
MQTT_CLIENT_CONNECTED 

Definition at line 64 of file mqtt_client.h.

Variable Documentation

◆ global_mqtt_client

MQTTClientComponent* esphome::mqtt::global_mqtt_client