.................
This commit is contained in:
@@ -17,13 +17,18 @@ static const char *TAG = "showcase_component.component";
|
||||
|
||||
class ShowcaseComponent : public i2c::I2CDevice, public Component, public EntityBase {
|
||||
public:
|
||||
State s_;
|
||||
float b_upper_ = 1.0;
|
||||
float b_lower_ = 1.0;
|
||||
State s_{Off};
|
||||
float b_upper_{1.0};
|
||||
float b_lower_{1.0};
|
||||
|
||||
void turn_on();
|
||||
void turn_off();
|
||||
|
||||
void publish_state(){ this->remote_values_callback_.call(); }
|
||||
|
||||
void add_new_remote_values_callback(std::function<void()> &&send_callback) {
|
||||
this->remote_values_callback_.add(std::move(send_callback));
|
||||
}
|
||||
|
||||
void setup() override;
|
||||
void loop() override;
|
||||
@@ -76,6 +81,8 @@ class ShowcaseComponent : public i2c::I2CDevice, public Component, public Entity
|
||||
this->lower_->set_level(bright);
|
||||
}
|
||||
protected:
|
||||
CallbackManager<void()> remote_values_callback_{};
|
||||
|
||||
output::FloatOutput *upper_;
|
||||
output::FloatOutput *lower_;
|
||||
/* monochromatic::MonochromaticLightOutput *upper_; */
|
||||
|
||||
Reference in New Issue
Block a user