ESPHome  2024.10.2
Public Member Functions | Protected Types | Protected Attributes
esphome::ComponentIterator Class Referenceabstract

#include <component_iterator.h>

Inheritance diagram for esphome::ComponentIterator:
esphome::api::InitialStateIterator esphome::api::ListEntitiesIterator esphome::web_server::ListEntitiesIterator

Public Member Functions

void begin (bool include_internal=false)
 
void advance ()
 
virtual bool on_begin ()
 
virtual bool on_binary_sensor (binary_sensor::BinarySensor *binary_sensor)=0
 
virtual bool on_cover (cover::Cover *cover)=0
 
virtual bool on_fan (fan::Fan *fan)=0
 
virtual bool on_light (light::LightState *light)=0
 
virtual bool on_sensor (sensor::Sensor *sensor)=0
 
virtual bool on_switch (switch_::Switch *a_switch)=0
 
virtual bool on_button (button::Button *button)=0
 
virtual bool on_text_sensor (text_sensor::TextSensor *text_sensor)=0
 
virtual bool on_service (api::UserServiceDescriptor *service)
 
virtual bool on_camera (esp32_camera::ESP32Camera *camera)
 
virtual bool on_climate (climate::Climate *climate)=0
 
virtual bool on_number (number::Number *number)=0
 
virtual bool on_date (datetime::DateEntity *date)=0
 
virtual bool on_time (datetime::TimeEntity *time)=0
 
virtual bool on_datetime (datetime::DateTimeEntity *datetime)=0
 
virtual bool on_text (text::Text *text)=0
 
virtual bool on_select (select::Select *select)=0
 
virtual bool on_lock (lock::Lock *a_lock)=0
 
virtual bool on_valve (valve::Valve *valve)=0
 
virtual bool on_media_player (media_player::MediaPlayer *media_player)
 
virtual bool on_alarm_control_panel (alarm_control_panel::AlarmControlPanel *a_alarm_control_panel)=0
 
virtual bool on_event (event::Event *event)=0
 
virtual bool on_update (update::UpdateEntity *update)=0
 
virtual bool on_end ()
 

Protected Types

enum  IteratorState {
  IteratorState::NONE = 0, IteratorState::BEGIN, IteratorState::BINARY_SENSOR, IteratorState::COVER,
  IteratorState::FAN, IteratorState::LIGHT, IteratorState::SENSOR, IteratorState::SWITCH,
  IteratorState::BUTTON, IteratorState::TEXT_SENSOR, IteratorState::SERVICE, IteratorState::CAMERA,
  IteratorState::CLIMATE, IteratorState::NUMBER, IteratorState::DATETIME_DATE, IteratorState::DATETIME_TIME,
  IteratorState::DATETIME_DATETIME, IteratorState::TEXT, IteratorState::SELECT, IteratorState::LOCK,
  IteratorState::VALVE, IteratorState::MEDIA_PLAYER, IteratorState::ALARM_CONTROL_PANEL, IteratorState::EVENT,
  IteratorState::UPDATE, IteratorState::MAX
}
 

Protected Attributes

enum esphome::ComponentIterator::IteratorState NONE
 
size_t at_ {0}
 
bool include_internal_ {false}
 

Detailed Description

Definition at line 19 of file component_iterator.h.

Member Enumeration Documentation

◆ IteratorState

Enumerator
NONE 
BEGIN 
BINARY_SENSOR 
COVER 
FAN 
LIGHT 
SENSOR 
SWITCH 
BUTTON 
TEXT_SENSOR 
SERVICE 
CAMERA 
CLIMATE 
NUMBER 
DATETIME_DATE 
DATETIME_TIME 
DATETIME_DATETIME 
TEXT 
SELECT 
LOCK 
VALVE 
MEDIA_PLAYER 
ALARM_CONTROL_PANEL 
EVENT 
UPDATE 
MAX 

Definition at line 96 of file component_iterator.h.

Member Function Documentation

◆ advance()

void esphome::ComponentIterator::advance ( )

Definition at line 17 of file component_iterator.cpp.

◆ begin()

void esphome::ComponentIterator::begin ( bool  include_internal = false)

Definition at line 12 of file component_iterator.cpp.

◆ on_alarm_control_panel()

virtual bool esphome::ComponentIterator::on_alarm_control_panel ( alarm_control_panel::AlarmControlPanel a_alarm_control_panel)
pure virtual

◆ on_begin()

bool esphome::ComponentIterator::on_begin ( )
virtual

Definition at line 385 of file component_iterator.cpp.

◆ on_binary_sensor()

virtual bool esphome::ComponentIterator::on_binary_sensor ( binary_sensor::BinarySensor binary_sensor)
pure virtual

◆ on_button()

virtual bool esphome::ComponentIterator::on_button ( button::Button button)
pure virtual

◆ on_camera()

bool esphome::ComponentIterator::on_camera ( esp32_camera::ESP32Camera camera)
virtual

Reimplemented in esphome::api::ListEntitiesIterator.

Definition at line 390 of file component_iterator.cpp.

◆ on_climate()

virtual bool esphome::ComponentIterator::on_climate ( climate::Climate climate)
pure virtual

◆ on_cover()

virtual bool esphome::ComponentIterator::on_cover ( cover::Cover cover)
pure virtual

◆ on_date()

virtual bool esphome::ComponentIterator::on_date ( datetime::DateEntity date)
pure virtual

◆ on_datetime()

virtual bool esphome::ComponentIterator::on_datetime ( datetime::DateTimeEntity datetime)
pure virtual

◆ on_end()

bool esphome::ComponentIterator::on_end ( )
virtual

Reimplemented in esphome::api::ListEntitiesIterator.

Definition at line 384 of file component_iterator.cpp.

◆ on_event()

virtual bool esphome::ComponentIterator::on_event ( event::Event event)
pure virtual

◆ on_fan()

virtual bool esphome::ComponentIterator::on_fan ( fan::Fan fan)
pure virtual

◆ on_light()

virtual bool esphome::ComponentIterator::on_light ( light::LightState light)
pure virtual

◆ on_lock()

virtual bool esphome::ComponentIterator::on_lock ( lock::Lock a_lock)
pure virtual

◆ on_media_player()

bool esphome::ComponentIterator::on_media_player ( media_player::MediaPlayer media_player)
virtual

◆ on_number()

virtual bool esphome::ComponentIterator::on_number ( number::Number number)
pure virtual

◆ on_select()

virtual bool esphome::ComponentIterator::on_select ( select::Select select)
pure virtual

◆ on_sensor()

virtual bool esphome::ComponentIterator::on_sensor ( sensor::Sensor sensor)
pure virtual

◆ on_service()

bool esphome::ComponentIterator::on_service ( api::UserServiceDescriptor service)
virtual

Reimplemented in esphome::api::ListEntitiesIterator.

Definition at line 387 of file component_iterator.cpp.

◆ on_switch()

virtual bool esphome::ComponentIterator::on_switch ( switch_::Switch a_switch)
pure virtual

◆ on_text()

virtual bool esphome::ComponentIterator::on_text ( text::Text text)
pure virtual

◆ on_text_sensor()

virtual bool esphome::ComponentIterator::on_text_sensor ( text_sensor::TextSensor text_sensor)
pure virtual

◆ on_time()

virtual bool esphome::ComponentIterator::on_time ( datetime::TimeEntity time)
pure virtual

◆ on_update()

virtual bool esphome::ComponentIterator::on_update ( update::UpdateEntity update)
pure virtual

◆ on_valve()

virtual bool esphome::ComponentIterator::on_valve ( valve::Valve valve)
pure virtual

Field Documentation

◆ at_

size_t esphome::ComponentIterator::at_ {0}
protected

Definition at line 170 of file component_iterator.h.

◆ include_internal_

bool esphome::ComponentIterator::include_internal_ {false}
protected

Definition at line 171 of file component_iterator.h.

◆ NONE

enum esphome::ComponentIterator::IteratorState esphome::ComponentIterator::NONE
protected

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