ESPHome 2026.2.1
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::mqtt {
12
14 public:
16 void send_discovery(JsonObject root, mqtt::SendDiscoveryConfig &config) override;
17 bool send_initial_state() override;
18 const char *component_type() const override;
19 void setup() override;
20
21 MQTT_COMPONENT_CUSTOM_TOPIC(current_temperature, state)
22 MQTT_COMPONENT_CUSTOM_TOPIC(current_humidity, state)
34 MQTT_COMPONENT_CUSTOM_TOPIC(away, command)
42
43 protected:
44 const EntityBase *get_entity() const override;
45
47
48 climate::Climate *device_;
49};
50
51} // namespace esphome::mqtt
52
53#endif
54#endif // USE_MQTT
BedjetMode mode
BedJet operating mode.
ClimateDevice - This is the base class for all climate integrations.
Definition climate.h:182
MQTTClimateComponent(climate::Climate *device)
state command command command command command command state state state MQTT_COMPONENT_CUSTOM_TOPIC(preset, command) protected bool publish_state_()
MQTT_COMPONENT_CUSTOM_TOPIC(current_temperature, state) MQTT_COMPONENT_CUSTOM_TOPIC(current_humidity
void send_discovery(JsonObject root, mqtt::SendDiscoveryConfig &config) override
const char * 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:2
Simple Helper struct used for Home Assistant MQTT send_discovery().