ESPHome 2025.5.0
Loading...
Searching...
No Matches
automation.h
Go to the documentation of this file.
1#pragma once
2
6
7namespace esphome {
8
9namespace pulse_counter {
10
11template<typename... Ts> class SetTotalPulsesAction : public Action<Ts...> {
12 public:
13 SetTotalPulsesAction(PulseCounterSensor *pulse_counter) : pulse_counter_(pulse_counter) {}
14
15 TEMPLATABLE_VALUE(uint32_t, total_pulses)
16
17 void play(Ts... x) override { this->pulse_counter_->set_total_pulses(this->total_pulses_.value(x...)); }
18
19 protected:
21};
22
23} // namespace pulse_counter
24} // namespace esphome
virtual void play(Ts... x)=0
TEMPLATABLE_VALUE(uint32_t, total_pulses) void play(Ts... x) override
Definition automation.h:15
SetTotalPulsesAction(PulseCounterSensor *pulse_counter)
Definition automation.h:13
Providing packet encoding functions for exchanging data with a remote host.
Definition a01nyub.cpp:7
uint16_t x
Definition tt21100.cpp:5