ESPHome  2024.6.6
automation.h
Go to the documentation of this file.
1 #pragma once
2 
6 
7 namespace esphome {
8 
9 namespace pulse_meter {
10 
11 template<typename... Ts> class SetTotalPulsesAction : public Action<Ts...> {
12  public:
13  SetTotalPulsesAction(PulseMeterSensor *pulse_meter) : pulse_meter_(pulse_meter) {}
14 
15  TEMPLATABLE_VALUE(uint32_t, total_pulses)
16 
17  void play(Ts... x) override { this->pulse_meter_->set_total_pulses(this->total_pulses_.value(x...)); }
18 
19  protected:
21 };
22 
23 } // namespace pulse_meter
24 } // namespace esphome
TEMPLATABLE_VALUE(uint32_t, total_pulses) void play(Ts... x) override
Definition: automation.h:15
uint16_t x
Definition: tt21100.cpp:17
SetTotalPulsesAction(PulseMeterSensor *pulse_meter)
Definition: automation.h:13
This is a workaround until we can figure out a way to get the tflite-micro idf component code availab...
Definition: a01nyub.cpp:7
virtual void play(Ts... x)=0