mirror of
https://github.com/esphome/esphome.git
synced 2026-06-24 13:45:15 +00:00
Add the C++ `final` specifier to leaf, user-configurable component classes and automation action/trigger/condition primitives so that classes meant to be terminal cannot be subclassed by external components. Only classes never used as a base anywhere in the tree are marked. Part 17 of 21, split alphabetically by component (ssd1351_spi .. tem3200).
26 lines
649 B
C++
26 lines
649 B
C++
#pragma once
|
|
|
|
#include "esphome/components/sx1509/sx1509.h"
|
|
#include "esphome/components/output/float_output.h"
|
|
|
|
namespace esphome::sx1509 {
|
|
|
|
class SX1509Component;
|
|
|
|
class SX1509FloatOutputChannel final : public output::FloatOutput, public Component {
|
|
public:
|
|
void set_parent(SX1509Component *parent) { this->parent_ = parent; }
|
|
void set_pin(uint8_t pin) { pin_ = pin; }
|
|
void setup() override;
|
|
void dump_config() override;
|
|
float get_setup_priority() const override { return setup_priority::HARDWARE; }
|
|
|
|
protected:
|
|
void write_state(float state) override;
|
|
|
|
SX1509Component *parent_;
|
|
uint8_t pin_;
|
|
};
|
|
|
|
} // namespace esphome::sx1509
|