ESPHome 2025.12.0-dev
Loading...
Searching...
No Matches
controller_registry.h
Go to the documentation of this file.
1#pragma once
2
4
5#ifdef USE_CONTROLLER_REGISTRY
6
8
9// Forward declarations
10namespace esphome {
11
12class Controller;
13
14#ifdef USE_BINARY_SENSOR
15namespace binary_sensor {
16class BinarySensor;
17}
18#endif
19
20#ifdef USE_FAN
21namespace fan {
22class Fan;
23}
24#endif
25
26#ifdef USE_LIGHT
27namespace light {
28class LightState;
29}
30#endif
31
32#ifdef USE_SENSOR
33namespace sensor {
34class Sensor;
35}
36#endif
37
38#ifdef USE_SWITCH
39namespace switch_ {
40class Switch;
41}
42#endif
43
44#ifdef USE_COVER
45namespace cover {
46class Cover;
47}
48#endif
49
50#ifdef USE_TEXT_SENSOR
51namespace text_sensor {
52class TextSensor;
53}
54#endif
55
56#ifdef USE_CLIMATE
57namespace climate {
58class Climate;
59}
60#endif
61
62#ifdef USE_NUMBER
63namespace number {
64class Number;
65}
66#endif
67
68#ifdef USE_DATETIME_DATE
69namespace datetime {
70class DateEntity;
71}
72#endif
73
74#ifdef USE_DATETIME_TIME
75namespace datetime {
76class TimeEntity;
77}
78#endif
79
80#ifdef USE_DATETIME_DATETIME
81namespace datetime {
82class DateTimeEntity;
83}
84#endif
85
86#ifdef USE_TEXT
87namespace text {
88class Text;
89}
90#endif
91
92#ifdef USE_SELECT
93namespace select {
94class Select;
95}
96#endif
97
98#ifdef USE_LOCK
99namespace lock {
100class Lock;
101}
102#endif
103
104#ifdef USE_VALVE
105namespace valve {
106class Valve;
107}
108#endif
109
110#ifdef USE_MEDIA_PLAYER
111namespace media_player {
112class MediaPlayer;
113}
114#endif
115
116#ifdef USE_ALARM_CONTROL_PANEL
117namespace alarm_control_panel {
118class AlarmControlPanel;
119}
120#endif
121
122#ifdef USE_EVENT
123namespace event {
124class Event;
125}
126#endif
127
128#ifdef USE_UPDATE
129namespace update {
130class UpdateEntity;
131}
132#endif
133
151 public:
157 static void register_controller(Controller *controller);
158
159#ifdef USE_BINARY_SENSOR
161#endif
162
163#ifdef USE_FAN
164 static void notify_fan_update(fan::Fan *obj);
165#endif
166
167#ifdef USE_LIGHT
169#endif
170
171#ifdef USE_SENSOR
173#endif
174
175#ifdef USE_SWITCH
177#endif
178
179#ifdef USE_COVER
181#endif
182
183#ifdef USE_TEXT_SENSOR
185#endif
186
187#ifdef USE_CLIMATE
189#endif
190
191#ifdef USE_NUMBER
193#endif
194
195#ifdef USE_DATETIME_DATE
197#endif
198
199#ifdef USE_DATETIME_TIME
201#endif
202
203#ifdef USE_DATETIME_DATETIME
205#endif
206
207#ifdef USE_TEXT
209#endif
210
211#ifdef USE_SELECT
213#endif
214
215#ifdef USE_LOCK
217#endif
218
219#ifdef USE_VALVE
221#endif
222
223#ifdef USE_MEDIA_PLAYER
225#endif
226
227#ifdef USE_ALARM_CONTROL_PANEL
229#endif
230
231#ifdef USE_EVENT
232 static void notify_event(event::Event *obj);
233#endif
234
235#ifdef USE_UPDATE
237#endif
238
239 protected:
241};
242
243} // namespace esphome
244
245#endif // USE_CONTROLLER_REGISTRY
Global registry for Controllers to receive entity state updates.
static void notify_select_update(select::Select *obj)
static void notify_binary_sensor_update(binary_sensor::BinarySensor *obj)
static void notify_datetime_update(datetime::DateTimeEntity *obj)
static void notify_cover_update(cover::Cover *obj)
static void notify_date_update(datetime::DateEntity *obj)
static void notify_event(event::Event *obj)
static void notify_lock_update(lock::Lock *obj)
static void notify_time_update(datetime::TimeEntity *obj)
static void notify_update(update::UpdateEntity *obj)
static void notify_sensor_update(sensor::Sensor *obj)
static void notify_text_update(text::Text *obj)
static void notify_light_update(light::LightState *obj)
static void notify_number_update(number::Number *obj)
static void notify_valve_update(valve::Valve *obj)
static void notify_text_sensor_update(text_sensor::TextSensor *obj)
static void notify_media_player_update(media_player::MediaPlayer *obj)
static void notify_alarm_control_panel_update(alarm_control_panel::AlarmControlPanel *obj)
static void register_controller(Controller *controller)
Register a controller to receive entity state updates.
static void notify_climate_update(climate::Climate *obj)
static void notify_fan_update(fan::Fan *obj)
static StaticVector< Controller *, CONTROLLER_REGISTRY_MAX > controllers
static void notify_switch_update(switch_::Switch *obj)
Minimal static vector - saves memory by avoiding std::vector overhead.
Definition helpers.h:132
Base class for all binary_sensor-type classes.
ClimateDevice - This is the base class for all climate integrations.
Definition climate.h:178
Base class for all cover devices.
Definition cover.h:112
This class represents the communication layer between the front-end MQTT layer and the hardware outpu...
Definition light_state.h:69
Base class for all locks.
Definition lock.h:109
Base-class for all numbers.
Definition number.h:30
Base-class for all selects.
Definition select.h:31
Base-class for all sensors.
Definition sensor.h:42
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