ESPHome  2024.3.1
api_pb2_service.h
Go to the documentation of this file.
1 // This file was automatically generated with a tool.
2 // See scripts/api_protobuf/api_protobuf.py
3 #pragma once
4 
5 #include "api_pb2.h"
6 #include "esphome/core/defines.h"
7 
8 namespace esphome {
9 namespace api {
10 
12  public:
13  virtual void on_hello_request(const HelloRequest &value){};
14  bool send_hello_response(const HelloResponse &msg);
15  virtual void on_connect_request(const ConnectRequest &value){};
16  bool send_connect_response(const ConnectResponse &msg);
18  virtual void on_disconnect_request(const DisconnectRequest &value){};
20  virtual void on_disconnect_response(const DisconnectResponse &value){};
21  bool send_ping_request(const PingRequest &msg);
22  virtual void on_ping_request(const PingRequest &value){};
23  bool send_ping_response(const PingResponse &msg);
24  virtual void on_ping_response(const PingResponse &value){};
25  virtual void on_device_info_request(const DeviceInfoRequest &value){};
27  virtual void on_list_entities_request(const ListEntitiesRequest &value){};
30 #ifdef USE_BINARY_SENSOR
32 #endif
33 #ifdef USE_BINARY_SENSOR
35 #endif
36 #ifdef USE_COVER
38 #endif
39 #ifdef USE_COVER
41 #endif
42 #ifdef USE_COVER
43  virtual void on_cover_command_request(const CoverCommandRequest &value){};
44 #endif
45 #ifdef USE_FAN
47 #endif
48 #ifdef USE_FAN
50 #endif
51 #ifdef USE_FAN
52  virtual void on_fan_command_request(const FanCommandRequest &value){};
53 #endif
54 #ifdef USE_LIGHT
56 #endif
57 #ifdef USE_LIGHT
59 #endif
60 #ifdef USE_LIGHT
61  virtual void on_light_command_request(const LightCommandRequest &value){};
62 #endif
63 #ifdef USE_SENSOR
65 #endif
66 #ifdef USE_SENSOR
68 #endif
69 #ifdef USE_SWITCH
71 #endif
72 #ifdef USE_SWITCH
74 #endif
75 #ifdef USE_SWITCH
76  virtual void on_switch_command_request(const SwitchCommandRequest &value){};
77 #endif
78 #ifdef USE_TEXT_SENSOR
80 #endif
81 #ifdef USE_TEXT_SENSOR
83 #endif
84  virtual void on_subscribe_logs_request(const SubscribeLogsRequest &value){};
91  bool send_get_time_request(const GetTimeRequest &msg);
92  virtual void on_get_time_request(const GetTimeRequest &value){};
93  bool send_get_time_response(const GetTimeResponse &msg);
94  virtual void on_get_time_response(const GetTimeResponse &value){};
96  virtual void on_execute_service_request(const ExecuteServiceRequest &value){};
97 #ifdef USE_ESP32_CAMERA
99 #endif
100 #ifdef USE_ESP32_CAMERA
102 #endif
103 #ifdef USE_ESP32_CAMERA
104  virtual void on_camera_image_request(const CameraImageRequest &value){};
105 #endif
106 #ifdef USE_CLIMATE
108 #endif
109 #ifdef USE_CLIMATE
111 #endif
112 #ifdef USE_CLIMATE
113  virtual void on_climate_command_request(const ClimateCommandRequest &value){};
114 #endif
115 #ifdef USE_NUMBER
117 #endif
118 #ifdef USE_NUMBER
120 #endif
121 #ifdef USE_NUMBER
122  virtual void on_number_command_request(const NumberCommandRequest &value){};
123 #endif
124 #ifdef USE_SELECT
126 #endif
127 #ifdef USE_SELECT
129 #endif
130 #ifdef USE_SELECT
131  virtual void on_select_command_request(const SelectCommandRequest &value){};
132 #endif
133 #ifdef USE_LOCK
135 #endif
136 #ifdef USE_LOCK
138 #endif
139 #ifdef USE_LOCK
140  virtual void on_lock_command_request(const LockCommandRequest &value){};
141 #endif
142 #ifdef USE_BUTTON
144 #endif
145 #ifdef USE_BUTTON
146  virtual void on_button_command_request(const ButtonCommandRequest &value){};
147 #endif
148 #ifdef USE_MEDIA_PLAYER
150 #endif
151 #ifdef USE_MEDIA_PLAYER
153 #endif
154 #ifdef USE_MEDIA_PLAYER
156 #endif
157 #ifdef USE_BLUETOOTH_PROXY
160 #endif
161 #ifdef USE_BLUETOOTH_PROXY
163 #endif
164 #ifdef USE_BLUETOOTH_PROXY
166 #endif
167 #ifdef USE_BLUETOOTH_PROXY
169 #endif
170 #ifdef USE_BLUETOOTH_PROXY
172 #endif
173 #ifdef USE_BLUETOOTH_PROXY
175 #endif
176 #ifdef USE_BLUETOOTH_PROXY
178 #endif
179 #ifdef USE_BLUETOOTH_PROXY
181 #endif
182 #ifdef USE_BLUETOOTH_PROXY
184 #endif
185 #ifdef USE_BLUETOOTH_PROXY
187 #endif
188 #ifdef USE_BLUETOOTH_PROXY
190 #endif
191 #ifdef USE_BLUETOOTH_PROXY
193 #endif
194 #ifdef USE_BLUETOOTH_PROXY
196 #endif
197 #ifdef USE_BLUETOOTH_PROXY
199 #endif
200 #ifdef USE_BLUETOOTH_PROXY
202 #endif
203 #ifdef USE_BLUETOOTH_PROXY
205 #endif
206 #ifdef USE_BLUETOOTH_PROXY
208 #endif
209 #ifdef USE_BLUETOOTH_PROXY
211 #endif
212 #ifdef USE_BLUETOOTH_PROXY
214 #endif
215 #ifdef USE_BLUETOOTH_PROXY
217 #endif
218 #ifdef USE_BLUETOOTH_PROXY
220 #endif
221 #ifdef USE_BLUETOOTH_PROXY
223 #endif
224 #ifdef USE_BLUETOOTH_PROXY
227 #endif
228 #ifdef USE_BLUETOOTH_PROXY
230 #endif
231 #ifdef USE_VOICE_ASSISTANT
233 #endif
234 #ifdef USE_VOICE_ASSISTANT
236 #endif
237 #ifdef USE_VOICE_ASSISTANT
239 #endif
240 #ifdef USE_VOICE_ASSISTANT
242 #endif
243 #ifdef USE_ALARM_CONTROL_PANEL
245 #endif
246 #ifdef USE_ALARM_CONTROL_PANEL
248 #endif
249 #ifdef USE_ALARM_CONTROL_PANEL
251 #endif
252 #ifdef USE_TEXT
254 #endif
255 #ifdef USE_TEXT
257 #endif
258 #ifdef USE_TEXT
259  virtual void on_text_command_request(const TextCommandRequest &value){};
260 #endif
261 #ifdef USE_DATETIME_DATE
263 #endif
264 #ifdef USE_DATETIME_DATE
266 #endif
267 #ifdef USE_DATETIME_DATE
268  virtual void on_date_command_request(const DateCommandRequest &value){};
269 #endif
270  protected:
271  bool read_message(uint32_t msg_size, uint32_t msg_type, uint8_t *msg_data) override;
272 };
273 
275  public:
276  virtual HelloResponse hello(const HelloRequest &msg) = 0;
277  virtual ConnectResponse connect(const ConnectRequest &msg) = 0;
278  virtual DisconnectResponse disconnect(const DisconnectRequest &msg) = 0;
279  virtual PingResponse ping(const PingRequest &msg) = 0;
280  virtual DeviceInfoResponse device_info(const DeviceInfoRequest &msg) = 0;
281  virtual void list_entities(const ListEntitiesRequest &msg) = 0;
282  virtual void subscribe_states(const SubscribeStatesRequest &msg) = 0;
283  virtual void subscribe_logs(const SubscribeLogsRequest &msg) = 0;
284  virtual void subscribe_homeassistant_services(const SubscribeHomeassistantServicesRequest &msg) = 0;
285  virtual void subscribe_home_assistant_states(const SubscribeHomeAssistantStatesRequest &msg) = 0;
286  virtual GetTimeResponse get_time(const GetTimeRequest &msg) = 0;
287  virtual void execute_service(const ExecuteServiceRequest &msg) = 0;
288 #ifdef USE_COVER
289  virtual void cover_command(const CoverCommandRequest &msg) = 0;
290 #endif
291 #ifdef USE_FAN
292  virtual void fan_command(const FanCommandRequest &msg) = 0;
293 #endif
294 #ifdef USE_LIGHT
295  virtual void light_command(const LightCommandRequest &msg) = 0;
296 #endif
297 #ifdef USE_SWITCH
298  virtual void switch_command(const SwitchCommandRequest &msg) = 0;
299 #endif
300 #ifdef USE_ESP32_CAMERA
301  virtual void camera_image(const CameraImageRequest &msg) = 0;
302 #endif
303 #ifdef USE_CLIMATE
304  virtual void climate_command(const ClimateCommandRequest &msg) = 0;
305 #endif
306 #ifdef USE_NUMBER
307  virtual void number_command(const NumberCommandRequest &msg) = 0;
308 #endif
309 #ifdef USE_TEXT
310  virtual void text_command(const TextCommandRequest &msg) = 0;
311 #endif
312 #ifdef USE_SELECT
313  virtual void select_command(const SelectCommandRequest &msg) = 0;
314 #endif
315 #ifdef USE_BUTTON
316  virtual void button_command(const ButtonCommandRequest &msg) = 0;
317 #endif
318 #ifdef USE_LOCK
319  virtual void lock_command(const LockCommandRequest &msg) = 0;
320 #endif
321 #ifdef USE_MEDIA_PLAYER
322  virtual void media_player_command(const MediaPlayerCommandRequest &msg) = 0;
323 #endif
324 #ifdef USE_DATETIME_DATE
325  virtual void date_command(const DateCommandRequest &msg) = 0;
326 #endif
327 #ifdef USE_BLUETOOTH_PROXY
328  virtual void subscribe_bluetooth_le_advertisements(const SubscribeBluetoothLEAdvertisementsRequest &msg) = 0;
329 #endif
330 #ifdef USE_BLUETOOTH_PROXY
331  virtual void bluetooth_device_request(const BluetoothDeviceRequest &msg) = 0;
332 #endif
333 #ifdef USE_BLUETOOTH_PROXY
334  virtual void bluetooth_gatt_get_services(const BluetoothGATTGetServicesRequest &msg) = 0;
335 #endif
336 #ifdef USE_BLUETOOTH_PROXY
337  virtual void bluetooth_gatt_read(const BluetoothGATTReadRequest &msg) = 0;
338 #endif
339 #ifdef USE_BLUETOOTH_PROXY
340  virtual void bluetooth_gatt_write(const BluetoothGATTWriteRequest &msg) = 0;
341 #endif
342 #ifdef USE_BLUETOOTH_PROXY
343  virtual void bluetooth_gatt_read_descriptor(const BluetoothGATTReadDescriptorRequest &msg) = 0;
344 #endif
345 #ifdef USE_BLUETOOTH_PROXY
346  virtual void bluetooth_gatt_write_descriptor(const BluetoothGATTWriteDescriptorRequest &msg) = 0;
347 #endif
348 #ifdef USE_BLUETOOTH_PROXY
349  virtual void bluetooth_gatt_notify(const BluetoothGATTNotifyRequest &msg) = 0;
350 #endif
351 #ifdef USE_BLUETOOTH_PROXY
352  virtual BluetoothConnectionsFreeResponse subscribe_bluetooth_connections_free(
354 #endif
355 #ifdef USE_BLUETOOTH_PROXY
356  virtual void unsubscribe_bluetooth_le_advertisements(const UnsubscribeBluetoothLEAdvertisementsRequest &msg) = 0;
357 #endif
358 #ifdef USE_VOICE_ASSISTANT
359  virtual void subscribe_voice_assistant(const SubscribeVoiceAssistantRequest &msg) = 0;
360 #endif
361 #ifdef USE_ALARM_CONTROL_PANEL
362  virtual void alarm_control_panel_command(const AlarmControlPanelCommandRequest &msg) = 0;
363 #endif
364  protected:
365  void on_hello_request(const HelloRequest &msg) override;
366  void on_connect_request(const ConnectRequest &msg) override;
367  void on_disconnect_request(const DisconnectRequest &msg) override;
368  void on_ping_request(const PingRequest &msg) override;
369  void on_device_info_request(const DeviceInfoRequest &msg) override;
370  void on_list_entities_request(const ListEntitiesRequest &msg) override;
371  void on_subscribe_states_request(const SubscribeStatesRequest &msg) override;
372  void on_subscribe_logs_request(const SubscribeLogsRequest &msg) override;
375  void on_get_time_request(const GetTimeRequest &msg) override;
376  void on_execute_service_request(const ExecuteServiceRequest &msg) override;
377 #ifdef USE_COVER
378  void on_cover_command_request(const CoverCommandRequest &msg) override;
379 #endif
380 #ifdef USE_FAN
381  void on_fan_command_request(const FanCommandRequest &msg) override;
382 #endif
383 #ifdef USE_LIGHT
384  void on_light_command_request(const LightCommandRequest &msg) override;
385 #endif
386 #ifdef USE_SWITCH
387  void on_switch_command_request(const SwitchCommandRequest &msg) override;
388 #endif
389 #ifdef USE_ESP32_CAMERA
390  void on_camera_image_request(const CameraImageRequest &msg) override;
391 #endif
392 #ifdef USE_CLIMATE
393  void on_climate_command_request(const ClimateCommandRequest &msg) override;
394 #endif
395 #ifdef USE_NUMBER
396  void on_number_command_request(const NumberCommandRequest &msg) override;
397 #endif
398 #ifdef USE_TEXT
399  void on_text_command_request(const TextCommandRequest &msg) override;
400 #endif
401 #ifdef USE_SELECT
402  void on_select_command_request(const SelectCommandRequest &msg) override;
403 #endif
404 #ifdef USE_BUTTON
405  void on_button_command_request(const ButtonCommandRequest &msg) override;
406 #endif
407 #ifdef USE_LOCK
408  void on_lock_command_request(const LockCommandRequest &msg) override;
409 #endif
410 #ifdef USE_MEDIA_PLAYER
412 #endif
413 #ifdef USE_DATETIME_DATE
414  void on_date_command_request(const DateCommandRequest &msg) override;
415 #endif
416 #ifdef USE_BLUETOOTH_PROXY
418 #endif
419 #ifdef USE_BLUETOOTH_PROXY
420  void on_bluetooth_device_request(const BluetoothDeviceRequest &msg) override;
421 #endif
422 #ifdef USE_BLUETOOTH_PROXY
424 #endif
425 #ifdef USE_BLUETOOTH_PROXY
427 #endif
428 #ifdef USE_BLUETOOTH_PROXY
430 #endif
431 #ifdef USE_BLUETOOTH_PROXY
433 #endif
434 #ifdef USE_BLUETOOTH_PROXY
436 #endif
437 #ifdef USE_BLUETOOTH_PROXY
439 #endif
440 #ifdef USE_BLUETOOTH_PROXY
442 #endif
443 #ifdef USE_BLUETOOTH_PROXY
445  const UnsubscribeBluetoothLEAdvertisementsRequest &msg) override;
446 #endif
447 #ifdef USE_VOICE_ASSISTANT
449 #endif
450 #ifdef USE_ALARM_CONTROL_PANEL
452 #endif
453 };
454 
455 } // namespace api
456 } // namespace esphome
bool send_list_entities_binary_sensor_response(const ListEntitiesBinarySensorResponse &msg)
virtual void on_climate_command_request(const ClimateCommandRequest &value)
bool send_date_state_response(const DateStateResponse &msg)
virtual void on_subscribe_home_assistant_states_request(const SubscribeHomeAssistantStatesRequest &value)
bool send_fan_state_response(const FanStateResponse &msg)
bool send_ping_response(const PingResponse &msg)
virtual void on_subscribe_homeassistant_services_request(const SubscribeHomeassistantServicesRequest &value)
bool send_bluetooth_gatt_read_response(const BluetoothGATTReadResponse &msg)
virtual void on_hello_request(const HelloRequest &value)
bool send_text_state_response(const TextStateResponse &msg)
bool send_get_time_response(const GetTimeResponse &msg)
bool send_ping_request(const PingRequest &msg)
virtual void on_unsubscribe_bluetooth_le_advertisements_request(const UnsubscribeBluetoothLEAdvertisementsRequest &value)
virtual void on_bluetooth_device_request(const BluetoothDeviceRequest &value)
bool send_bluetooth_gatt_notify_data_response(const BluetoothGATTNotifyDataResponse &msg)
virtual void on_voice_assistant_response(const VoiceAssistantResponse &value)
virtual void on_ping_response(const PingResponse &value)
virtual void on_light_command_request(const LightCommandRequest &value)
bool send_subscribe_logs_response(const SubscribeLogsResponse &msg)
bool send_climate_state_response(const ClimateStateResponse &msg)
bool send_binary_sensor_state_response(const BinarySensorStateResponse &msg)
bool send_bluetooth_gatt_error_response(const BluetoothGATTErrorResponse &msg)
bool send_list_entities_fan_response(const ListEntitiesFanResponse &msg)
bool send_number_state_response(const NumberStateResponse &msg)
virtual void on_home_assistant_state_response(const HomeAssistantStateResponse &value)
bool send_list_entities_select_response(const ListEntitiesSelectResponse &msg)
bool send_homeassistant_service_response(const HomeassistantServiceResponse &msg)
bool send_bluetooth_gatt_write_response(const BluetoothGATTWriteResponse &msg)
virtual void on_bluetooth_gatt_write_request(const BluetoothGATTWriteRequest &value)
bool send_bluetooth_device_connection_response(const BluetoothDeviceConnectionResponse &msg)
virtual void on_connect_request(const ConnectRequest &value)
bool send_list_entities_done_response(const ListEntitiesDoneResponse &msg)
bool send_device_info_response(const DeviceInfoResponse &msg)
virtual void on_subscribe_voice_assistant_request(const SubscribeVoiceAssistantRequest &value)
bool send_connect_response(const ConnectResponse &msg)
virtual void on_subscribe_bluetooth_le_advertisements_request(const SubscribeBluetoothLEAdvertisementsRequest &value)
virtual void on_list_entities_request(const ListEntitiesRequest &value)
virtual void on_disconnect_request(const DisconnectRequest &value)
virtual void on_text_command_request(const TextCommandRequest &value)
virtual void on_select_command_request(const SelectCommandRequest &value)
virtual void on_disconnect_response(const DisconnectResponse &value)
virtual void on_bluetooth_gatt_get_services_request(const BluetoothGATTGetServicesRequest &value)
bool send_bluetooth_le_advertisement_response(const BluetoothLEAdvertisementResponse &msg)
virtual void on_camera_image_request(const CameraImageRequest &value)
bool send_list_entities_services_response(const ListEntitiesServicesResponse &msg)
virtual void on_lock_command_request(const LockCommandRequest &value)
bool send_bluetooth_gatt_get_services_response(const BluetoothGATTGetServicesResponse &msg)
virtual void on_media_player_command_request(const MediaPlayerCommandRequest &value)
bool send_list_entities_text_sensor_response(const ListEntitiesTextSensorResponse &msg)
virtual void on_subscribe_bluetooth_connections_free_request(const SubscribeBluetoothConnectionsFreeRequest &value)
bool send_bluetooth_device_unpairing_response(const BluetoothDeviceUnpairingResponse &msg)
virtual void on_alarm_control_panel_command_request(const AlarmControlPanelCommandRequest &value)
bool send_list_entities_light_response(const ListEntitiesLightResponse &msg)
virtual void on_cover_command_request(const CoverCommandRequest &value)
bool send_text_sensor_state_response(const TextSensorStateResponse &msg)
virtual void on_voice_assistant_event_response(const VoiceAssistantEventResponse &value)
bool send_bluetooth_gatt_notify_response(const BluetoothGATTNotifyResponse &msg)
bool send_list_entities_cover_response(const ListEntitiesCoverResponse &msg)
bool send_disconnect_request(const DisconnectRequest &msg)
bool send_list_entities_camera_response(const ListEntitiesCameraResponse &msg)
bool send_list_entities_button_response(const ListEntitiesButtonResponse &msg)
bool send_list_entities_media_player_response(const ListEntitiesMediaPlayerResponse &msg)
bool send_voice_assistant_request(const VoiceAssistantRequest &msg)
virtual void on_date_command_request(const DateCommandRequest &value)
virtual void on_execute_service_request(const ExecuteServiceRequest &value)
bool send_list_entities_number_response(const ListEntitiesNumberResponse &msg)
bool send_switch_state_response(const SwitchStateResponse &msg)
bool read_message(uint32_t msg_size, uint32_t msg_type, uint8_t *msg_data) override
bool send_camera_image_response(const CameraImageResponse &msg)
bool send_list_entities_lock_response(const ListEntitiesLockResponse &msg)
bool send_list_entities_sensor_response(const ListEntitiesSensorResponse &msg)
bool send_list_entities_alarm_control_panel_response(const ListEntitiesAlarmControlPanelResponse &msg)
virtual void on_subscribe_states_request(const SubscribeStatesRequest &value)
bool send_select_state_response(const SelectStateResponse &msg)
bool send_bluetooth_connections_free_response(const BluetoothConnectionsFreeResponse &msg)
virtual void on_bluetooth_gatt_read_descriptor_request(const BluetoothGATTReadDescriptorRequest &value)
virtual void on_bluetooth_gatt_write_descriptor_request(const BluetoothGATTWriteDescriptorRequest &value)
bool send_light_state_response(const LightStateResponse &msg)
virtual void on_bluetooth_gatt_notify_request(const BluetoothGATTNotifyRequest &value)
virtual void on_number_command_request(const NumberCommandRequest &value)
bool send_media_player_state_response(const MediaPlayerStateResponse &msg)
bool send_subscribe_home_assistant_state_response(const SubscribeHomeAssistantStateResponse &msg)
bool send_get_time_request(const GetTimeRequest &msg)
bool send_list_entities_switch_response(const ListEntitiesSwitchResponse &msg)
virtual void on_get_time_request(const GetTimeRequest &value)
bool send_list_entities_date_response(const ListEntitiesDateResponse &msg)
virtual void on_fan_command_request(const FanCommandRequest &value)
This is a workaround until we can figure out a way to get the tflite-micro idf component code availab...
Definition: a01nyub.cpp:7
bool send_sensor_state_response(const SensorStateResponse &msg)
bool send_cover_state_response(const CoverStateResponse &msg)
bool send_list_entities_text_response(const ListEntitiesTextResponse &msg)
bool send_hello_response(const HelloResponse &msg)
bool send_alarm_control_panel_state_response(const AlarmControlPanelStateResponse &msg)
bool send_list_entities_climate_response(const ListEntitiesClimateResponse &msg)
bool send_disconnect_response(const DisconnectResponse &msg)
bool send_bluetooth_device_pairing_response(const BluetoothDevicePairingResponse &msg)
bool send_bluetooth_gatt_get_services_done_response(const BluetoothGATTGetServicesDoneResponse &msg)
virtual void on_button_command_request(const ButtonCommandRequest &value)
bool send_lock_state_response(const LockStateResponse &msg)
bool send_bluetooth_device_clear_cache_response(const BluetoothDeviceClearCacheResponse &msg)
virtual void on_device_info_request(const DeviceInfoRequest &value)
bool send_bluetooth_le_raw_advertisements_response(const BluetoothLERawAdvertisementsResponse &msg)
virtual void on_switch_command_request(const SwitchCommandRequest &value)
virtual void on_get_time_response(const GetTimeResponse &value)
virtual void on_bluetooth_gatt_read_request(const BluetoothGATTReadRequest &value)
virtual void on_ping_request(const PingRequest &value)
virtual void on_subscribe_logs_request(const SubscribeLogsRequest &value)