Files
esphome/esphome/components/sx1509/output/sx1509_float_output.h
Jesse Hills 49d6718345 Mark user-configurable classes as final (part 17/21)
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).
2026-06-15 13:22:16 +12:00

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