ESPHome 2026.10.2
Loading...
Searching...
No Matches
automation.h
Go to the documentation of this file.
1#pragma once
2
4#include "climate.h"
5
6namespace esphome::climate {
7
8class ControlTrigger final : public Trigger<ClimateCall &> {
9 public:
11 climate->add_on_control_callback([this](ClimateCall &x) { this->trigger(x); });
12 }
13};
14
15class StateTrigger final : public Trigger<Climate &> {
16 public:
18 climate->add_on_state_callback([this](Climate &x) { this->trigger(x); });
19 }
20};
21
22} // namespace esphome::climate
void trigger(const Ts &...x) ESPHOME_ALWAYS_INLINE
Definition automation.h:528
This class is used to encode all control actions on a climate device.
Definition climate.h:34
ClimateDevice - This is the base class for all climate integrations.
Definition climate.h:195
void add_on_control_callback(F &&callback)
Add a callback for the climate device configuration; each time the configuration parameters of a clim...
Definition climate.h:214
void add_on_state_callback(F &&callback)
Add a callback for the climate device state, each time the state of the climate device is updated (us...
Definition climate.h:204
ControlTrigger(Climate *climate)
Definition automation.h:10
StateTrigger(Climate *climate)
Definition automation.h:17
uint16_t x
Definition tt21100.cpp:5