|
|
|
|
@ -3,14 +3,18 @@
|
|
|
|
|
#include "esphome/core/component.h"
|
|
|
|
|
#include "esphome/components/i2c/i2c.h"
|
|
|
|
|
/* #include "esphome/components/output/float_output.h" */
|
|
|
|
|
// TODO: maybe use monochrome leds instead of floatoutput directly?:
|
|
|
|
|
/* #include "esphome/components/monochromatic/monochromatic_light_output.h" */
|
|
|
|
|
|
|
|
|
|
namespace esphome {
|
|
|
|
|
namespace showcase_component {
|
|
|
|
|
|
|
|
|
|
/* enum state{ Off, Auto, On }; */
|
|
|
|
|
enum state{ Off, Auto, On };
|
|
|
|
|
|
|
|
|
|
class ShowcaseComponent : public i2c::I2CDevice, public Component {
|
|
|
|
|
public:
|
|
|
|
|
state s;
|
|
|
|
|
|
|
|
|
|
void setup() override;
|
|
|
|
|
void loop() override;
|
|
|
|
|
void dump_config() override;
|
|
|
|
|
@ -21,11 +25,15 @@ class ShowcaseComponent : public i2c::I2CDevice, public Component {
|
|
|
|
|
/* void write_state(float upper, float lower){ */
|
|
|
|
|
/* this->upper_->set_level(upper); */
|
|
|
|
|
/* this->lower_->set_level(lower); */
|
|
|
|
|
/* /\* this->upper_->write_state(upper); *\/ */
|
|
|
|
|
/* /\* this->lower_->write_state(lower); *\/ */
|
|
|
|
|
/* } */
|
|
|
|
|
|
|
|
|
|
/* protected: */
|
|
|
|
|
protected:
|
|
|
|
|
/* output::FloatOutput *upper_; */
|
|
|
|
|
/* output::FloatOutput *lower_; */
|
|
|
|
|
/* monochromatic::MonochromaticLightOutput *upper_; */
|
|
|
|
|
/* monochromatic::MonochromaticLightOutput *lower_; */
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
} // namespace empty_i2c_component
|
|
|
|
|
|