ESPHome  2024.10.2
nextion_component.h
Go to the documentation of this file.
1 #pragma once
2 #include "esphome/core/defines.h"
3 #include "esphome/core/color.h"
4 #include "nextion_base.h"
5 
6 namespace esphome {
7 namespace nextion {
8 class NextionComponent;
9 
11  public:
12  void update_component_settings() override { this->update_component_settings(false); };
13 
14  void update_component_settings(bool force_update) override;
15 
16  void set_background_color(Color bco);
18  void set_foreground_color(Color pco);
20  void set_font_id(uint8_t font_id);
21  void set_visible(bool visible);
22 
23  protected:
25 
26  bool bco_needs_update_ = false;
27  bool bco_is_set_ = false;
29  bool bco2_needs_update_ = false;
30  bool bco2_is_set_ = false;
32  bool pco_needs_update_ = false;
33  bool pco_is_set_ = false;
35  bool pco2_needs_update_ = false;
36  bool pco2_is_set_ = false;
38  uint8_t font_id_ = 0;
39  bool font_id_needs_update_ = false;
40  bool font_id_is_set_ = false;
41 
42  bool visible_ = true;
43  bool visible_needs_update_ = false;
44  bool visible_is_set_ = false;
45 
46  // void send_state_to_nextion() = 0;
47 };
48 } // namespace nextion
49 } // namespace esphome
Implementation of SPI Controller mode.
Definition: a01nyub.cpp:7