ESPHome 2025.5.0
Loading...
Searching...
No Matches
template_output.h
Go to the documentation of this file.
1#pragma once
2
6
7namespace esphome {
8namespace template_ {
9
11 public:
12 Trigger<bool> *get_trigger() const { return trigger_; }
13
14 protected:
15 void write_state(bool state) override { this->trigger_->trigger(state); }
16
18};
19
21 public:
22 Trigger<float> *get_trigger() const { return trigger_; }
23
24 protected:
25 void write_state(float state) override { this->trigger_->trigger(state); }
26
28};
29
30} // namespace template_
31} // namespace esphome
void trigger(Ts... x)
Inform the parent automation that the event has triggered.
Definition automation.h:96
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
Providing packet encoding functions for exchanging data with a remote host.
Definition a01nyub.cpp:7