mirror of
https://github.com/esphome/esphome.git
synced 2025-10-30 06:33:51 +00:00
brightness support for nextion (#1109)
This commit is contained in:
@@ -365,6 +365,7 @@ class Nextion : public PollingComponent, public uart::UARTDevice {
|
||||
// (In most use cases you won't need these)
|
||||
void register_touch_component(NextionTouchComponent *obj) { this->touch_.push_back(obj); }
|
||||
void setup() override;
|
||||
void set_brightness(float brightness) { this->brightness_ = brightness; }
|
||||
float get_setup_priority() const override;
|
||||
void update() override;
|
||||
void loop() override;
|
||||
@@ -392,6 +393,7 @@ class Nextion : public PollingComponent, public uart::UARTDevice {
|
||||
std::vector<NextionTouchComponent *> touch_;
|
||||
optional<nextion_writer_t> writer_;
|
||||
bool wait_for_ack_{true};
|
||||
float brightness_{1.0};
|
||||
};
|
||||
|
||||
class NextionTouchComponent : public binary_sensor::BinarySensorInitiallyOff {
|
||||
|
||||
Reference in New Issue
Block a user