ESPHome  2024.4.0
list_entities.cpp
Go to the documentation of this file.
1 #include "list_entities.h"
2 #include "api_connection.h"
4 #include "esphome/core/log.h"
5 #include "esphome/core/util.h"
6 
7 namespace esphome {
8 namespace api {
9 
10 #ifdef USE_BINARY_SENSOR
12  return this->client_->send_binary_sensor_info(binary_sensor);
13 }
14 #endif
15 #ifdef USE_COVER
17 #endif
18 #ifdef USE_FAN
19 bool ListEntitiesIterator::on_fan(fan::Fan *fan) { return this->client_->send_fan_info(fan); }
20 #endif
21 #ifdef USE_LIGHT
23 #endif
24 #ifdef USE_SENSOR
26 #endif
27 #ifdef USE_SWITCH
28 bool ListEntitiesIterator::on_switch(switch_::Switch *a_switch) { return this->client_->send_switch_info(a_switch); }
29 #endif
30 #ifdef USE_BUTTON
32 #endif
33 #ifdef USE_TEXT_SENSOR
35  return this->client_->send_text_sensor_info(text_sensor);
36 }
37 #endif
38 #ifdef USE_LOCK
39 bool ListEntitiesIterator::on_lock(lock::Lock *a_lock) { return this->client_->send_lock_info(a_lock); }
40 #endif
41 
45  auto resp = service->encode_list_service_response();
47 }
48 
49 #ifdef USE_ESP32_CAMERA
51  return this->client_->send_camera_info(camera);
52 }
53 #endif
54 
55 #ifdef USE_CLIMATE
57 #endif
58 
59 #ifdef USE_NUMBER
61 #endif
62 
63 #ifdef USE_DATETIME_DATE
65 #endif
66 
67 #ifdef USE_DATETIME_TIME
69 #endif
70 
71 #ifdef USE_TEXT
72 bool ListEntitiesIterator::on_text(text::Text *text) { return this->client_->send_text_info(text); }
73 #endif
74 
75 #ifdef USE_SELECT
77 #endif
78 
79 #ifdef USE_MEDIA_PLAYER
81  return this->client_->send_media_player_info(media_player);
82 }
83 #endif
84 #ifdef USE_ALARM_CONTROL_PANEL
86  return this->client_->send_alarm_control_panel_info(a_alarm_control_panel);
87 }
88 #endif
89 
90 } // namespace api
91 } // namespace esphome
bool on_date(datetime::DateEntity *date) override
Base class for all switches.
Definition: switch.h:39
bool on_cover(cover::Cover *cover) override
bool on_fan(fan::Fan *fan) override
bool send_time_info(datetime::TimeEntity *time)
This class represents the communication layer between the front-end MQTT layer and the hardware outpu...
Definition: light_state.h:34
bool send_text_info(text::Text *text)
bool send_climate_info(climate::Climate *climate)
Base class for all cover devices.
Definition: cover.h:111
bool send_cover_info(cover::Cover *cover)
bool on_text_sensor(text_sensor::TextSensor *text_sensor) override
bool on_number(number::Number *number) override
Base class for all buttons.
Definition: button.h:29
bool on_alarm_control_panel(alarm_control_panel::AlarmControlPanel *a_alarm_control_panel) override
bool send_camera_info(esp32_camera::ESP32Camera *camera)
bool on_camera(esp32_camera::ESP32Camera *camera) override
bool send_button_info(button::Button *button)
bool on_binary_sensor(binary_sensor::BinarySensor *binary_sensor) override
bool send_date_info(datetime::DateEntity *date)
bool on_time(datetime::TimeEntity *time) override
Base-class for all text inputs.
Definition: text.h:24
bool send_number_info(number::Number *number)
bool send_binary_sensor_info(binary_sensor::BinarySensor *binary_sensor)
bool on_media_player(media_player::MediaPlayer *media_player) override
bool send_select_info(select::Select *select)
bool send_list_entities_services_response(const ListEntitiesServicesResponse &msg)
bool on_light(light::LightState *light) override
Base-class for all numbers.
Definition: number.h:39
bool send_media_player_info(media_player::MediaPlayer *media_player)
bool send_alarm_control_panel_info(alarm_control_panel::AlarmControlPanel *a_alarm_control_panel)
bool on_switch(switch_::Switch *a_switch) override
bool send_fan_info(fan::Fan *fan)
bool on_button(button::Button *button) override
bool on_sensor(sensor::Sensor *sensor) override
ListEntitiesIterator(APIConnection *client)
virtual ListEntitiesServicesResponse encode_list_service_response()=0
bool on_text(text::Text *text) override
bool send_light_info(light::LightState *light)
bool send_sensor_info(sensor::Sensor *sensor)
bool on_select(select::Select *select) override
bool on_service(UserServiceDescriptor *service) override
Base-class for all selects.
Definition: select.h:31
This is a workaround until we can figure out a way to get the tflite-micro idf component code availab...
Definition: a01nyub.cpp:7
bool on_lock(lock::Lock *a_lock) override
Base class for all binary_sensor-type classes.
Definition: binary_sensor.h:37
bool send_lock_info(lock::Lock *a_lock)
bool send_switch_info(switch_::Switch *a_switch)
bool send_text_sensor_info(text_sensor::TextSensor *text_sensor)
Base-class for all sensors.
Definition: sensor.h:57
bool on_climate(climate::Climate *climate) override
Base class for all locks.
Definition: lock.h:103
ClimateDevice - This is the base class for all climate integrations.
Definition: climate.h:168