ESPHome 2025.5.0
Loading...
Searching...
No Matches
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
8namespace esphome {
9namespace api {
10
11#ifdef USE_BINARY_SENSOR
13 this->client_->send_binary_sensor_info(binary_sensor);
14 return true;
15}
16#endif
17#ifdef USE_COVER
19 this->client_->send_cover_info(cover);
20 return true;
21}
22#endif
23#ifdef USE_FAN
25 this->client_->send_fan_info(fan);
26 return true;
27}
28#endif
29#ifdef USE_LIGHT
31 this->client_->send_light_info(light);
32 return true;
33}
34#endif
35#ifdef USE_SENSOR
37 this->client_->send_sensor_info(sensor);
38 return true;
39}
40#endif
41#ifdef USE_SWITCH
43 this->client_->send_switch_info(a_switch);
44 return true;
45}
46#endif
47#ifdef USE_BUTTON
49 this->client_->send_button_info(button);
50 return true;
51}
52#endif
53#ifdef USE_TEXT_SENSOR
55 this->client_->send_text_sensor_info(text_sensor);
56 return true;
57}
58#endif
59#ifdef USE_LOCK
61 this->client_->send_lock_info(a_lock);
62 return true;
63}
64#endif
65#ifdef USE_VALVE
67 this->client_->send_valve_info(valve);
68 return true;
69}
70#endif
71
78
79#ifdef USE_ESP32_CAMERA
81 this->client_->send_camera_info(camera);
82 return true;
83}
84#endif
85
86#ifdef USE_CLIMATE
88 this->client_->send_climate_info(climate);
89 return true;
90}
91#endif
92
93#ifdef USE_NUMBER
95 this->client_->send_number_info(number);
96 return true;
97}
98#endif
99
100#ifdef USE_DATETIME_DATE
102 this->client_->send_date_info(date);
103 return true;
104}
105#endif
106
107#ifdef USE_DATETIME_TIME
109 this->client_->send_time_info(time);
110 return true;
111}
112#endif
113
114#ifdef USE_DATETIME_DATETIME
116 this->client_->send_datetime_info(datetime);
117 return true;
118}
119#endif
120
121#ifdef USE_TEXT
123 this->client_->send_text_info(text);
124 return true;
125}
126#endif
127
128#ifdef USE_SELECT
130 this->client_->send_select_info(select);
131 return true;
132}
133#endif
134
135#ifdef USE_MEDIA_PLAYER
137 this->client_->send_media_player_info(media_player);
138 return true;
139}
140#endif
141#ifdef USE_ALARM_CONTROL_PANEL
143 this->client_->send_alarm_control_panel_info(a_alarm_control_panel);
144 return true;
145}
146#endif
147#ifdef USE_EVENT
149 this->client_->send_event_info(event);
150 return true;
151}
152#endif
153#ifdef USE_UPDATE
155 this->client_->send_update_info(update);
156 return true;
157}
158#endif
159
160} // namespace api
161} // namespace esphome
162#endif
void send_valve_info(valve::Valve *valve)
void send_media_player_info(media_player::MediaPlayer *media_player)
void send_light_info(light::LightState *light)
void send_climate_info(climate::Climate *climate)
void send_datetime_info(datetime::DateTimeEntity *datetime)
void send_number_info(number::Number *number)
void send_sensor_info(sensor::Sensor *sensor)
void send_switch_info(switch_::Switch *a_switch)
void send_binary_sensor_info(binary_sensor::BinarySensor *binary_sensor)
void send_select_info(select::Select *select)
void send_alarm_control_panel_info(alarm_control_panel::AlarmControlPanel *a_alarm_control_panel)
void send_update_info(update::UpdateEntity *update)
void send_camera_info(esp32_camera::ESP32Camera *camera)
void send_event_info(event::Event *event)
void send_date_info(datetime::DateEntity *date)
void send_text_sensor_info(text_sensor::TextSensor *text_sensor)
void send_button_info(button::Button *button)
void send_fan_info(fan::Fan *fan)
void send_time_info(datetime::TimeEntity *time)
void send_cover_info(cover::Cover *cover)
void send_lock_info(lock::Lock *a_lock)
void send_text_info(text::Text *text)
bool send_list_entities_services_response(const ListEntitiesServicesResponse &msg)
bool on_media_player(media_player::MediaPlayer *media_player) override
bool on_cover(cover::Cover *cover) override
ListEntitiesIterator(APIConnection *client)
bool on_sensor(sensor::Sensor *sensor) override
bool on_number(number::Number *number) override
bool on_event(event::Event *event) override
bool on_lock(lock::Lock *a_lock) override
bool on_datetime(datetime::DateTimeEntity *datetime) override
bool on_light(light::LightState *light) override
bool on_valve(valve::Valve *valve) override
bool on_button(button::Button *button) override
bool on_date(datetime::DateEntity *date) override
bool on_fan(fan::Fan *fan) override
bool on_alarm_control_panel(alarm_control_panel::AlarmControlPanel *a_alarm_control_panel) override
bool on_service(UserServiceDescriptor *service) override
bool on_camera(esp32_camera::ESP32Camera *camera) override
bool on_time(datetime::TimeEntity *time) override
bool on_switch(switch_::Switch *a_switch) override
bool on_text(text::Text *text) override
bool on_select(select::Select *select) override
bool on_text_sensor(text_sensor::TextSensor *text_sensor) override
bool on_climate(climate::Climate *climate) override
bool on_binary_sensor(binary_sensor::BinarySensor *binary_sensor) override
bool on_update(update::UpdateEntity *update) override
virtual ListEntitiesServicesResponse encode_list_service_response()=0
Base class for all binary_sensor-type classes.
Base class for all buttons.
Definition button.h:29
ClimateDevice - This is the base class for all climate integrations.
Definition climate.h:168
Base class for all cover devices.
Definition cover.h:111
This class represents the communication layer between the front-end MQTT layer and the hardware outpu...
Definition light_state.h:63
Base class for all locks.
Definition lock.h:103
Base-class for all numbers.
Definition number.h:39
Base-class for all selects.
Definition select.h:31
Base-class for all sensors.
Definition sensor.h:57
Base class for all switches.
Definition switch.h:39
Base-class for all text inputs.
Definition text.h:24
Base class for all valve devices.
Definition valve.h:105
Providing packet encoding functions for exchanging data with a remote host.
Definition a01nyub.cpp:7