ESPHome  2022.11.3
sx1509_float_output.h
Go to the documentation of this file.
1 #pragma once
2 
5 
6 namespace esphome {
7 namespace sx1509 {
8 
9 class SX1509Component;
10 
12  public:
13  void set_parent(SX1509Component *parent) { this->parent_ = parent; }
14  void set_pin(uint8_t pin) { pin_ = pin; }
15  void setup() override;
16  void dump_config() override;
17  float get_setup_priority() const override { return setup_priority::HARDWARE; }
18 
19  protected:
20  void write_state(float state) override;
21 
23  uint8_t pin_;
24 };
25 
26 } // namespace sx1509
27 } // namespace esphome
void set_parent(SX1509Component *parent)
Base class for all output components that can output a variable level, like PWM.
Definition: float_output.h:31
const float HARDWARE
For components that deal with hardware and are very important like GPIO switch.
Definition: component.cpp:17
Definition: a4988.cpp:4
bool state
Definition: fan.h:34