ESPHome 2026.1.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_WATER_HEATER
123namespace water_heater {
124class WaterHeater;
125}
126#endif
127
128#ifdef USE_EVENT
129namespace event {
130class Event;
131}
132#endif
133
134#ifdef USE_UPDATE
135namespace update {
136class UpdateEntity;
137}
138#endif
139
157 public:
163 static void register_controller(Controller *controller);
164
165#ifdef USE_BINARY_SENSOR
167#endif
168
169#ifdef USE_FAN
170 static void notify_fan_update(fan::Fan *obj);
171#endif
172
173#ifdef USE_LIGHT
175#endif
176
177#ifdef USE_SENSOR
179#endif
180
181#ifdef USE_SWITCH
183#endif
184
185#ifdef USE_COVER
187#endif
188
189#ifdef USE_TEXT_SENSOR
191#endif
192
193#ifdef USE_CLIMATE
195#endif
196
197#ifdef USE_NUMBER
199#endif
200
201#ifdef USE_DATETIME_DATE
203#endif
204
205#ifdef USE_DATETIME_TIME
207#endif
208
209#ifdef USE_DATETIME_DATETIME
211#endif
212
213#ifdef USE_TEXT
215#endif
216
217#ifdef USE_SELECT
219#endif
220
221#ifdef USE_LOCK
223#endif
224
225#ifdef USE_VALVE
227#endif
228
229#ifdef USE_MEDIA_PLAYER
231#endif
232
233#ifdef USE_ALARM_CONTROL_PANEL
235#endif
236
237#ifdef USE_WATER_HEATER
239#endif
240
241#ifdef USE_EVENT
242 static void notify_event(event::Event *obj);
243#endif
244
245#ifdef USE_UPDATE
247#endif
248
249 protected:
251};
252
253} // namespace esphome
254
255#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 notify_water_heater_update(water_heater::WaterHeater *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:181
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:91
Base class for all locks.
Definition lock.h:111
Base-class for all numbers.
Definition number.h:29
Base-class for all selects.
Definition select.h:30
Base-class for all sensors.
Definition sensor.h:43
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:106
Providing packet encoding functions for exchanging data with a remote host.
Definition a01nyub.cpp:7