ESPHome 2025.12.2
Loading...
Searching...
No Matches
template_output.h
Go to the documentation of this file.
1#pragma once
2
6
7namespace esphome::template_ {
8
10 public:
11 Trigger<bool> *get_trigger() const { return trigger_; }
12
13 protected:
14 void write_state(bool state) override { this->trigger_->trigger(state); }
15
17};
18
20 public:
21 Trigger<float> *get_trigger() const { return trigger_; }
22
23 protected:
24 void write_state(float state) override { this->trigger_->trigger(state); }
25
27};
28
29} // namespace esphome::template_
void trigger(const Ts &...x)
Inform the parent automation that the event has triggered.
Definition automation.h:204
Base class for all output components that can output a variable level, like PWM.
Trigger< float > * get_trigger() const
void write_state(float state) override
bool state
Definition fan.h:0