ESPHome  2025.2.0
automation.h
Go to the documentation of this file.
1 #pragma once
2 
4 #include "hub.h"
5 #include "opentherm.h"
6 
7 namespace esphome {
8 namespace opentherm {
9 
10 class BeforeSendTrigger : public Trigger<OpenthermData &> {
11  public:
13  hub->add_on_before_send_callback([this](OpenthermData &x) { this->trigger(x); });
14  }
15 };
16 
17 class BeforeProcessResponseTrigger : public Trigger<OpenthermData &> {
18  public:
21  }
22 };
23 
24 } // namespace opentherm
25 } // namespace esphome
void add_on_before_process_response_callback(std::function< void(OpenthermData &)> &&callback)
Definition: hub.h:166
uint16_t x
Definition: tt21100.cpp:17
void trigger(Ts... x)
Inform the parent automation that the event has triggered.
Definition: automation.h:95
BeforeSendTrigger(OpenthermHub *hub)
Definition: automation.h:12
void add_on_before_send_callback(std::function< void(OpenthermData &)> &&callback)
Definition: hub.h:163
Implementation of SPI Controller mode.
Definition: a01nyub.cpp:7
Structure to hold Opentherm data packet content.
Definition: opentherm.h:184