ESPHome  2024.10.2
template_output.h
Go to the documentation of this file.
1 #pragma once
2 
6 
7 namespace esphome {
8 namespace 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
Trigger< bool > * get_trigger() const
Trigger< float > * get_trigger() const
Base class for all output components that can output a variable level, like PWM.
Definition: float_output.h:31
void trigger(Ts... x)
Inform the parent automation that the event has triggered.
Definition: automation.h:95
void write_state(float state) override
Implementation of SPI Controller mode.
Definition: a01nyub.cpp:7
void write_state(bool state) override
bool state
Definition: fan.h:34