ESPHome  2024.10.2
list_entities.cpp
Go to the documentation of this file.
1 #include "list_entities.h"
2 #ifdef USE_API
3 #include "api_connection.h"
5 #include "esphome/core/log.h"
6 #include "esphome/core/util.h"
7 
8 namespace esphome {
9 namespace api {
10 
11 #ifdef USE_BINARY_SENSOR
13  return this->client_->send_binary_sensor_info(binary_sensor);
14 }
15 #endif
16 #ifdef USE_COVER
18 #endif
19 #ifdef USE_FAN
20 bool ListEntitiesIterator::on_fan(fan::Fan *fan) { return this->client_->send_fan_info(fan); }
21 #endif
22 #ifdef USE_LIGHT
24 #endif
25 #ifdef USE_SENSOR
27 #endif
28 #ifdef USE_SWITCH
29 bool ListEntitiesIterator::on_switch(switch_::Switch *a_switch) { return this->client_->send_switch_info(a_switch); }
30 #endif
31 #ifdef USE_BUTTON
33 #endif
34 #ifdef USE_TEXT_SENSOR
36  return this->client_->send_text_sensor_info(text_sensor);
37 }
38 #endif
39 #ifdef USE_LOCK
40 bool ListEntitiesIterator::on_lock(lock::Lock *a_lock) { return this->client_->send_lock_info(a_lock); }
41 #endif
42 #ifdef USE_VALVE
44 #endif
45 
49  auto resp = service->encode_list_service_response();
51 }
52 
53 #ifdef USE_ESP32_CAMERA
55  return this->client_->send_camera_info(camera);
56 }
57 #endif
58 
59 #ifdef USE_CLIMATE
61 #endif
62 
63 #ifdef USE_NUMBER
65 #endif
66 
67 #ifdef USE_DATETIME_DATE
69 #endif
70 
71 #ifdef USE_DATETIME_TIME
73 #endif
74 
75 #ifdef USE_DATETIME_DATETIME
77  return this->client_->send_datetime_info(datetime);
78 }
79 #endif
80 
81 #ifdef USE_TEXT
82 bool ListEntitiesIterator::on_text(text::Text *text) { return this->client_->send_text_info(text); }
83 #endif
84 
85 #ifdef USE_SELECT
87 #endif
88 
89 #ifdef USE_MEDIA_PLAYER
91  return this->client_->send_media_player_info(media_player);
92 }
93 #endif
94 #ifdef USE_ALARM_CONTROL_PANEL
96  return this->client_->send_alarm_control_panel_info(a_alarm_control_panel);
97 }
98 #endif
99 #ifdef USE_EVENT
101 #endif
102 #ifdef USE_UPDATE
104 #endif
105 
106 } // namespace api
107 } // namespace esphome
108 #endif
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_update(update::UpdateEntity *update) override
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_datetime(datetime::DateTimeEntity *datetime) override
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 on_valve(valve::Valve *valve) override
bool on_event(event::Event *event) 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_event_info(event::Event *event)
bool send_update_info(update::UpdateEntity *update)
bool send_list_entities_services_response(const ListEntitiesServicesResponse &msg)
bool on_light(light::LightState *light) override
bool send_valve_info(valve::Valve *valve)
Base-class for all numbers.
Definition: number.h:39
bool send_datetime_info(datetime::DateTimeEntity *datetime)
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)
esphome::binary_sensor::BinarySensor * binary_sensor
Definition: statsd.h:40
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
Implementation of SPI Controller mode.
Definition: a01nyub.cpp:7
Base class for all valve devices.
Definition: valve.h:105
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
esphome::sensor::Sensor * sensor
Definition: statsd.h:37
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