ESPHome 2025.7.1
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"
4#include "api_pb2.h"
6#include "esphome/core/log.h"
7#include "esphome/core/util.h"
8
9namespace esphome {
10namespace api {
11
12// Generate entity handler implementations using macros
13#ifdef USE_BINARY_SENSOR
15#endif
16#ifdef USE_COVER
18#endif
19#ifdef USE_FAN
21#endif
22#ifdef USE_LIGHT
24#endif
25#ifdef USE_SENSOR
27#endif
28#ifdef USE_SWITCH
30#endif
31#ifdef USE_BUTTON
33#endif
34#ifdef USE_TEXT_SENSOR
36#endif
37#ifdef USE_LOCK
39#endif
40#ifdef USE_VALVE
42#endif
43#ifdef USE_CAMERA
45#endif
46#ifdef USE_CLIMATE
48#endif
49#ifdef USE_NUMBER
51#endif
52#ifdef USE_DATETIME_DATE
54#endif
55#ifdef USE_DATETIME_TIME
57#endif
58#ifdef USE_DATETIME_DATETIME
60#endif
61#ifdef USE_TEXT
63#endif
64#ifdef USE_SELECT
66#endif
67#ifdef USE_MEDIA_PLAYER
69#endif
70#ifdef USE_ALARM_CONTROL_PANEL
73#endif
74#ifdef USE_EVENT
76#endif
77#ifdef USE_UPDATE
79#endif
80
81// Special cases that don't follow the pattern
83
85
86#ifdef USE_API_SERVICES
88 auto resp = service->encode_list_service_response();
89 return this->client_->send_message(resp);
90}
91#endif
92
93} // namespace api
94} // namespace esphome
95#endif
ListEntitiesIterator(APIConnection *client)
bool on_service(UserServiceDescriptor *service) 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
Abstract camera base class.
Definition camera.h:57
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:66
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:62
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
LIST_ENTITIES_HANDLER(binary_sensor, binary_sensor::BinarySensor, ListEntitiesBinarySensorResponse) LIST_ENTITIES_HANDLER(cover
Providing packet encoding functions for exchanging data with a remote host.
Definition a01nyub.cpp:7