1
0
mirror of https://github.com/esphome/esphome.git synced 2025-03-27 13:08:20 +00:00
Jesse Hills 679633245d
Add gp8403 output component (#4495)
Co-authored-by: Samuel Sieb <samuel-github@sieb.net>
2023-05-08 12:45:12 +12:00

26 lines
598 B
C++

#pragma once
#include "esphome/components/output/float_output.h"
#include "esphome/core/component.h"
#include "esphome/components/gp8403/gp8403.h"
namespace esphome {
namespace gp8403 {
class GP8403Output : public Component, public output::FloatOutput, public Parented<GP8403> {
public:
void dump_config() override;
float get_setup_priority() const override { return setup_priority::DATA - 1; }
void set_channel(uint8_t channel) { this->channel_ = channel; }
void write_state(float state) override;
protected:
uint8_t channel_;
};
} // namespace gp8403
} // namespace esphome