ESPHome  2024.12.2
Public Member Functions | Protected Attributes
esphome::nextion::NextionComponent Class Reference

#include <nextion_component.h>

Inheritance diagram for esphome::nextion::NextionComponent:
esphome::nextion::NextionComponentBase esphome::nextion::NextionBinarySensor esphome::nextion::NextionSensor esphome::nextion::NextionSwitch esphome::nextion::NextionTextSensor

Public Member Functions

void update_component_settings () override
 
void update_component_settings (bool force_update) override
 
void set_background_color (Color bco)
 
void set_background_pressed_color (Color bco2)
 
void set_foreground_color (Color pco)
 
void set_foreground_pressed_color (Color pco2)
 
void set_font_id (uint8_t font_id)
 
void set_visible (bool visible)
 
- Public Member Functions inherited from esphome::nextion::NextionComponentBase
virtual ~NextionComponentBase ()=default
 
void set_variable_name (const std::string &variable_name, const std::string &variable_name_to_send="")
 
virtual void update_component ()
 
virtual void process_sensor (const std::string &variable_name, int state)
 
virtual void process_touch (uint8_t page_id, uint8_t component_id, bool on)
 
virtual void process_text (const std::string &variable_name, const std::string &text_value)
 
virtual void process_bool (const std::string &variable_name, bool on)
 
virtual void set_state (float state)
 
virtual void set_state (float state, bool publish)
 
virtual void set_state (float state, bool publish, bool send_to_nextion)
 
virtual void set_state (bool state)
 
virtual void set_state (bool state, bool publish)
 
virtual void set_state (bool state, bool publish, bool send_to_nextion)
 
virtual void set_state (const std::string &state)
 
virtual void set_state (const std::string &state, bool publish)
 
virtual void set_state (const std::string &state, bool publish, bool send_to_nextion)
 
uint8_t get_component_id ()
 
void set_component_id (uint8_t component_id)
 
uint8_t get_wave_channel_id ()
 
void set_wave_channel_id (uint8_t wave_chan_id)
 
std::vector< uint8_t > get_wave_buffer ()
 
size_t get_wave_buffer_size ()
 
void clear_wave_buffer (size_t buffer_sent)
 
std::string get_variable_name ()
 
std::string get_variable_name_to_send ()
 
virtual NextionQueueType get_queue_type ()
 
virtual std::string get_queue_type_string ()
 
virtual void set_state_from_int (int state_value, bool publish, bool send_to_nextion)
 
virtual void set_state_from_string (const std::string &state_value, bool publish, bool send_to_nextion)
 
virtual void send_state_to_nextion ()
 
bool get_needs_to_send_update ()
 
uint8_t get_wave_chan_id ()
 
void set_wave_max_length (int wave_max_length)
 

Protected Attributes

NextionBasenextion_
 
bool bco_needs_update_ = false
 
bool bco_is_set_ = false
 
Color bco_
 
bool bco2_needs_update_ = false
 
bool bco2_is_set_ = false
 
Color bco2_
 
bool pco_needs_update_ = false
 
bool pco_is_set_ = false
 
Color pco_
 
bool pco2_needs_update_ = false
 
bool pco2_is_set_ = false
 
Color pco2_
 
uint8_t font_id_ = 0
 
bool font_id_needs_update_ = false
 
bool font_id_is_set_ = false
 
bool visible_ = true
 
bool visible_needs_update_ = false
 
bool visible_is_set_ = false
 
- Protected Attributes inherited from esphome::nextion::NextionComponentBase
std::string variable_name_
 
std::string variable_name_to_send_
 
uint8_t component_id_ = 0
 
uint8_t wave_chan_id_ = UINT8_MAX
 
std::vector< uint8_t > wave_buffer_
 
int wave_max_length_ = 255
 
bool needs_to_send_update_
 

Detailed Description

Definition at line 10 of file nextion_component.h.

Member Function Documentation

◆ set_background_color()

void esphome::nextion::NextionComponent::set_background_color ( Color  bco)

Definition at line 6 of file nextion_component.cpp.

◆ set_background_pressed_color()

void esphome::nextion::NextionComponent::set_background_pressed_color ( Color  bco2)

Definition at line 16 of file nextion_component.cpp.

◆ set_font_id()

void esphome::nextion::NextionComponent::set_font_id ( uint8_t  font_id)

Definition at line 47 of file nextion_component.cpp.

◆ set_foreground_color()

void esphome::nextion::NextionComponent::set_foreground_color ( Color  pco)

Definition at line 27 of file nextion_component.cpp.

◆ set_foreground_pressed_color()

void esphome::nextion::NextionComponent::set_foreground_pressed_color ( Color  pco2)

Definition at line 37 of file nextion_component.cpp.

◆ set_visible()

void esphome::nextion::NextionComponent::set_visible ( bool  visible)

Definition at line 57 of file nextion_component.cpp.

◆ update_component_settings() [1/2]

void esphome::nextion::NextionComponent::update_component_settings ( )
inlineoverridevirtual

Reimplemented from esphome::nextion::NextionComponentBase.

Definition at line 12 of file nextion_component.h.

◆ update_component_settings() [2/2]

void esphome::nextion::NextionComponent::update_component_settings ( bool  force_update)
overridevirtual

Reimplemented from esphome::nextion::NextionComponentBase.

Definition at line 67 of file nextion_component.cpp.

Field Documentation

◆ bco2_

Color esphome::nextion::NextionComponent::bco2_
protected

Definition at line 31 of file nextion_component.h.

◆ bco2_is_set_

bool esphome::nextion::NextionComponent::bco2_is_set_ = false
protected

Definition at line 30 of file nextion_component.h.

◆ bco2_needs_update_

bool esphome::nextion::NextionComponent::bco2_needs_update_ = false
protected

Definition at line 29 of file nextion_component.h.

◆ bco_

Color esphome::nextion::NextionComponent::bco_
protected

Definition at line 28 of file nextion_component.h.

◆ bco_is_set_

bool esphome::nextion::NextionComponent::bco_is_set_ = false
protected

Definition at line 27 of file nextion_component.h.

◆ bco_needs_update_

bool esphome::nextion::NextionComponent::bco_needs_update_ = false
protected

Definition at line 26 of file nextion_component.h.

◆ font_id_

uint8_t esphome::nextion::NextionComponent::font_id_ = 0
protected

Definition at line 38 of file nextion_component.h.

◆ font_id_is_set_

bool esphome::nextion::NextionComponent::font_id_is_set_ = false
protected

Definition at line 40 of file nextion_component.h.

◆ font_id_needs_update_

bool esphome::nextion::NextionComponent::font_id_needs_update_ = false
protected

Definition at line 39 of file nextion_component.h.

◆ nextion_

NextionBase* esphome::nextion::NextionComponent::nextion_
protected

Definition at line 24 of file nextion_component.h.

◆ pco2_

Color esphome::nextion::NextionComponent::pco2_
protected

Definition at line 37 of file nextion_component.h.

◆ pco2_is_set_

bool esphome::nextion::NextionComponent::pco2_is_set_ = false
protected

Definition at line 36 of file nextion_component.h.

◆ pco2_needs_update_

bool esphome::nextion::NextionComponent::pco2_needs_update_ = false
protected

Definition at line 35 of file nextion_component.h.

◆ pco_

Color esphome::nextion::NextionComponent::pco_
protected

Definition at line 34 of file nextion_component.h.

◆ pco_is_set_

bool esphome::nextion::NextionComponent::pco_is_set_ = false
protected

Definition at line 33 of file nextion_component.h.

◆ pco_needs_update_

bool esphome::nextion::NextionComponent::pco_needs_update_ = false
protected

Definition at line 32 of file nextion_component.h.

◆ visible_

bool esphome::nextion::NextionComponent::visible_ = true
protected

Definition at line 42 of file nextion_component.h.

◆ visible_is_set_

bool esphome::nextion::NextionComponent::visible_is_set_ = false
protected

Definition at line 44 of file nextion_component.h.

◆ visible_needs_update_

bool esphome::nextion::NextionComponent::visible_needs_update_ = false
protected

Definition at line 43 of file nextion_component.h.


The documentation for this class was generated from the following files: