mirror of
https://github.com/Threnklyn/esphome-dev.git
synced 2026-05-30 01:38:27 +02:00
5f2808ec2f
* added ANALOG_OUTPUT as first functionality * added gpio * seperated the code for different functions * fixed code * Revert "fixed code" This reverts commit 0c6eacb225522f7d738fa371d0db976a97f2f3e8. * add timings for breathe and blink * made the sx1509_float_output am output component * add keypad * implementation for sx1509 keypad * keypad code cleanup and first device tests * debounce * keypad working now. * update for timings. does not compile yet * added all options for breathe and blink fixed var namings * blink and breath still not ok * fixed ms for timings * sync with repo * fixed issue with gpio pin output * code cleanup * lint * more lint * remove log from header * Update esphome/components/sx1509/__init__.py Co-Authored-By: Otto Winter <otto@otto-winter.com> * review * feedback * fixed review issues did some extended testing with mqtt spy * code cleanup (comments) * fixed row col swap for binarysensor_keypad * flake and lint * travis * travis * travis * Update esphome/components/sx1509/sx1509.cpp Co-Authored-By: Otto Winter <otto@otto-winter.com> * review * separated platforms * code cleanup * travis relative paths in python * remove blink/breathe code cleanup * cpp lint * feedback * travis * lint line to long * check keypad settings to be valid * clang * keypad config * text * Remove wrong .gitignore from .gitignore * Remove .pio folder from .gitignore (merge) * Formatting * Formatting * Add i2c log in dump_config * Remove unused variables * Disable static for header files We don't need internal linkage * Use consistent member default argument style * Run clang-format Co-authored-by: null <m.vanturnhout@exxellence.nl> Co-authored-by: Otto Winter <otto@otto-winter.com>
28 lines
669 B
C++
28 lines
669 B
C++
#pragma once
|
|
|
|
#include "esphome/components/sx1509/sx1509.h"
|
|
#include "esphome/components/output/float_output.h"
|
|
|
|
namespace esphome {
|
|
namespace sx1509 {
|
|
|
|
class SX1509Component;
|
|
|
|
class SX1509FloatOutputChannel : 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 sx1509
|
|
} // namespace esphome
|