ESPHome 2025.5.0
Loading...
Searching...
No Matches
mqtt_climate.h
Go to the documentation of this file.
1#pragma once
2
4
5#ifdef USE_MQTT
6#ifdef USE_CLIMATE
7
9#include "mqtt_component.h"
10
11namespace esphome {
12namespace mqtt {
13
15 public:
17 void send_discovery(JsonObject root, mqtt::SendDiscoveryConfig &config) override;
18 bool send_initial_state() override;
19 std::string component_type() const override;
20 void setup() override;
21
22 MQTT_COMPONENT_CUSTOM_TOPIC(current_temperature, state)
23 MQTT_COMPONENT_CUSTOM_TOPIC(current_humidity, state)
35 MQTT_COMPONENT_CUSTOM_TOPIC(away, command)
43
44 protected:
45 const EntityBase *get_entity() const override;
46
47 bool publish_state_();
48
49 climate::Climate *device_;
50};
51
52} // namespace mqtt
53} // namespace esphome
54
55#endif
56#endif // USE_MQTT
BedjetMode mode
BedJet operating mode.
ClimateDevice - This is the base class for all climate integrations.
Definition climate.h:168
MQTTClimateComponent(climate::Climate *device)
MQTT_COMPONENT_CUSTOM_TOPIC(current_temperature, state) MQTT_COMPONENT_CUSTOM_TOPIC(current_humidity
state command command command command command command state state state MQTT_COMPONENT_CUSTOM_TOPIC(preset, command) protected bool publish_state_()
void send_discovery(JsonObject root, mqtt::SendDiscoveryConfig &config) override
std::string component_type() const override
MQTTComponent is the base class for all components that interact with MQTT to expose certain function...
virtual const EntityBase * get_entity() const =0
Gets the Entity served by this MQTT component.
float target_temperature_high
Definition climate.h:3
float target_humidity
Definition climate.h:19
ClimateSwingMode swing_mode
Definition climate.h:11
float target_temperature
Definition climate.h:0
ClimateFanMode fan_mode
Definition climate.h:3
ClimatePreset preset
Definition climate.h:8
float target_temperature_low
Definition climate.h:2
bool state
Definition fan.h:0
Providing packet encoding functions for exchanging data with a remote host.
Definition a01nyub.cpp:7
Simple Helper struct used for Home Assistant MQTT send_discovery().