ESPHome  2024.10.2
gp8403_output.h
Go to the documentation of this file.
1 #pragma once
2 
5 
7 
8 namespace esphome {
9 namespace gp8403 {
10 
11 class GP8403Output : public Component, public output::FloatOutput, public Parented<GP8403> {
12  public:
13  void dump_config() override;
14  float get_setup_priority() const override { return setup_priority::DATA - 1; }
15 
16  void set_channel(uint8_t channel) { this->channel_ = channel; }
17 
18  void write_state(float state) override;
19 
20  protected:
21  uint8_t channel_;
22 };
23 
24 } // namespace gp8403
25 } // namespace esphome
const float DATA
For components that import data from directly connected sensors like DHT.
Definition: component.cpp:19
Base class for all output components that can output a variable level, like PWM.
Definition: float_output.h:31
void write_state(float state) override
Implementation of SPI Controller mode.
Definition: a01nyub.cpp:7
float get_setup_priority() const override
Definition: gp8403_output.h:14
Helper class to easily give an object a parent of type T.
Definition: helpers.h:521
void set_channel(uint8_t channel)
Definition: gp8403_output.h:16
bool state
Definition: fan.h:34