esphome 2025.6.2__py3-none-any.whl → 2025.7.0b1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (601) hide show
  1. esphome/__main__.py +1 -3
  2. esphome/codegen.py +2 -0
  3. esphome/components/ac_dimmer/ac_dimmer.cpp +6 -6
  4. esphome/components/adc/__init__.py +25 -1
  5. esphome/components/adc/adc_sensor.h +11 -11
  6. esphome/components/adc/adc_sensor_common.cpp +1 -1
  7. esphome/components/adc/adc_sensor_esp32.cpp +16 -8
  8. esphome/components/ade7880/ade7880.h +0 -2
  9. esphome/components/ads1115/ads1115.h +0 -1
  10. esphome/components/ads1118/ads1118.h +0 -1
  11. esphome/components/ags10/ags10.h +0 -2
  12. esphome/components/aic3204/aic3204.h +0 -1
  13. esphome/components/alarm_control_panel/__init__.py +5 -2
  14. esphome/components/alpha3/alpha3.h +0 -1
  15. esphome/components/am43/cover/am43_cover.h +0 -1
  16. esphome/components/am43/sensor/am43_sensor.h +0 -1
  17. esphome/components/analog_threshold/analog_threshold_binary_sensor.h +0 -2
  18. esphome/components/anova/anova.cpp +5 -1
  19. esphome/components/anova/anova.h +0 -1
  20. esphome/components/apds9960/apds9960.cpp +1 -1
  21. esphome/components/api/__init__.py +42 -20
  22. esphome/components/api/api_connection.cpp +318 -391
  23. esphome/components/api/api_connection.h +206 -126
  24. esphome/components/api/api_frame_helper.cpp +89 -124
  25. esphome/components/api/api_frame_helper.h +57 -45
  26. esphome/components/api/api_pb2.cpp +414 -4350
  27. esphome/components/api/api_pb2.h +287 -198
  28. esphome/components/api/api_pb2_dump.cpp +4333 -0
  29. esphome/components/api/api_pb2_service.cpp +180 -425
  30. esphome/components/api/api_pb2_service.h +7 -6
  31. esphome/components/api/api_pb2_size.h +2 -4
  32. esphome/components/api/api_server.cpp +138 -167
  33. esphome/components/api/api_server.h +66 -12
  34. esphome/components/api/client.py +10 -4
  35. esphome/components/api/list_entities.cpp +36 -105
  36. esphome/components/api/list_entities.h +31 -23
  37. esphome/components/api/proto.h +26 -3
  38. esphome/components/api/subscribe_state.cpp +23 -29
  39. esphome/components/api/subscribe_state.h +26 -19
  40. esphome/components/as5600/as5600.h +0 -1
  41. esphome/components/async_tcp/__init__.py +14 -5
  42. esphome/components/atc_mithermometer/atc_mithermometer.h +0 -1
  43. esphome/components/atm90e32/atm90e32.cpp +2 -1
  44. esphome/components/audio/audio_decoder.cpp +1 -1
  45. esphome/components/audio/audio_transfer_buffer.cpp +2 -2
  46. esphome/components/b_parasite/b_parasite.h +0 -1
  47. esphome/components/bedjet/bedjet_hub.cpp +5 -1
  48. esphome/components/bedjet/climate/bedjet_climate.cpp +5 -1
  49. esphome/components/beken_spi_led_strip/led_strip.cpp +4 -2
  50. esphome/components/bh1750/bh1750.cpp +5 -5
  51. esphome/components/binary_sensor/__init__.py +82 -5
  52. esphome/components/binary_sensor/automation.h +19 -1
  53. esphome/components/binary_sensor/binary_sensor.cpp +12 -30
  54. esphome/components/binary_sensor/binary_sensor.h +11 -25
  55. esphome/components/binary_sensor/filter.cpp +29 -24
  56. esphome/components/binary_sensor/filter.h +20 -10
  57. esphome/components/ble_client/output/ble_binary_output.h +0 -1
  58. esphome/components/ble_client/sensor/ble_rssi_sensor.cpp +5 -1
  59. esphome/components/ble_client/sensor/ble_rssi_sensor.h +0 -1
  60. esphome/components/ble_client/sensor/ble_sensor.cpp +5 -1
  61. esphome/components/ble_client/sensor/ble_sensor.h +0 -1
  62. esphome/components/ble_client/switch/ble_switch.h +0 -1
  63. esphome/components/ble_client/text_sensor/ble_text_sensor.cpp +5 -1
  64. esphome/components/ble_client/text_sensor/ble_text_sensor.h +0 -1
  65. esphome/components/ble_presence/ble_presence_device.h +0 -1
  66. esphome/components/ble_rssi/ble_rssi_sensor.h +0 -1
  67. esphome/components/ble_scanner/ble_scanner.h +0 -1
  68. esphome/components/bluetooth_proxy/bluetooth_connection.h +9 -2
  69. esphome/components/bluetooth_proxy/bluetooth_proxy.cpp +16 -6
  70. esphome/components/bluetooth_proxy/bluetooth_proxy.h +8 -2
  71. esphome/components/bme680/sensor.py +1 -1
  72. esphome/components/bmp581/bmp581.h +0 -2
  73. esphome/components/button/__init__.py +5 -2
  74. esphome/components/camera/__init__.py +1 -0
  75. esphome/components/camera/camera.cpp +22 -0
  76. esphome/components/camera/camera.h +80 -0
  77. esphome/components/canbus/__init__.py +1 -0
  78. esphome/components/cap1188/cap1188.h +0 -1
  79. esphome/components/captive_portal/__init__.py +12 -2
  80. esphome/components/captive_portal/captive_portal.cpp +12 -2
  81. esphome/components/captive_portal/captive_portal.h +5 -2
  82. esphome/components/ccs811/ccs811.h +0 -2
  83. esphome/components/climate/__init__.py +5 -2
  84. esphome/components/cm1106/sensor.py +2 -2
  85. esphome/components/const/__init__.py +2 -0
  86. esphome/components/copy/binary_sensor/copy_binary_sensor.h +0 -1
  87. esphome/components/copy/button/copy_button.h +0 -1
  88. esphome/components/copy/cover/copy_cover.h +0 -1
  89. esphome/components/copy/fan/copy_fan.h +0 -1
  90. esphome/components/copy/lock/copy_lock.h +0 -1
  91. esphome/components/copy/number/copy_number.h +0 -1
  92. esphome/components/copy/select/copy_select.h +0 -1
  93. esphome/components/copy/sensor/copy_sensor.h +0 -1
  94. esphome/components/copy/switch/copy_switch.h +0 -1
  95. esphome/components/copy/text/copy_text.h +0 -1
  96. esphome/components/copy/text_sensor/copy_text_sensor.h +0 -1
  97. esphome/components/cover/__init__.py +5 -2
  98. esphome/components/cs5460a/cs5460a.h +0 -1
  99. esphome/components/datetime/__init__.py +4 -2
  100. esphome/components/debug/__init__.py +20 -0
  101. esphome/components/deep_sleep/__init__.py +43 -9
  102. esphome/components/demo/__init__.py +2 -2
  103. esphome/components/display/display.cpp +4 -3
  104. esphome/components/display/display.h +0 -2
  105. esphome/components/display/display_buffer.cpp +1 -1
  106. esphome/components/ds2484/__init__.py +1 -0
  107. esphome/components/ds2484/ds2484.cpp +209 -0
  108. esphome/components/ds2484/ds2484.h +43 -0
  109. esphome/components/ds2484/one_wire.py +37 -0
  110. esphome/components/duty_time/duty_time_sensor.h +0 -1
  111. esphome/components/ens160_base/ens160_base.h +0 -1
  112. esphome/components/es7210/es7210.h +0 -1
  113. esphome/components/es7243e/es7243e.h +0 -1
  114. esphome/components/es8156/es8156.h +0 -1
  115. esphome/components/es8311/es8311.h +0 -1
  116. esphome/components/es8388/es8388.h +0 -1
  117. esphome/components/esp32/__init__.py +102 -135
  118. esphome/components/esp32/core.cpp +0 -4
  119. esphome/components/esp32/gpio.h +1 -1
  120. esphome/components/esp32/helpers.cpp +69 -0
  121. esphome/components/esp32_ble/ble.cpp +5 -6
  122. esphome/components/esp32_ble/ble.h +29 -14
  123. esphome/components/esp32_ble/ble_event.h +6 -6
  124. esphome/components/esp32_ble_client/ble_client_base.cpp +21 -6
  125. esphome/components/esp32_ble_client/ble_client_base.h +24 -9
  126. esphome/components/esp32_ble_tracker/__init__.py +2 -8
  127. esphome/components/esp32_ble_tracker/esp32_ble_tracker.cpp +5 -5
  128. esphome/components/esp32_ble_tracker/esp32_ble_tracker.h +11 -7
  129. esphome/components/esp32_camera/__init__.py +111 -97
  130. esphome/components/esp32_camera/esp32_camera.cpp +41 -31
  131. esphome/components/esp32_camera/esp32_camera.h +35 -30
  132. esphome/components/esp32_camera_web_server/__init__.py +2 -1
  133. esphome/components/esp32_camera_web_server/camera_web_server.cpp +8 -8
  134. esphome/components/esp32_camera_web_server/camera_web_server.h +3 -3
  135. esphome/components/esp32_hall/sensor.py +2 -21
  136. esphome/components/esp32_hosted/__init__.py +101 -0
  137. esphome/components/esp32_hosted/esp32_hosted.py.script +12 -0
  138. esphome/components/esp32_improv/esp32_improv_component.cpp +3 -0
  139. esphome/components/esp32_rmt/__init__.py +0 -58
  140. esphome/components/esp32_rmt_led_strip/led_strip.cpp +77 -63
  141. esphome/components/esp32_rmt_led_strip/led_strip.h +11 -17
  142. esphome/components/esp32_rmt_led_strip/light.py +14 -76
  143. esphome/components/esp32_touch/esp32_touch.h +174 -28
  144. esphome/components/esp32_touch/esp32_touch_common.cpp +162 -0
  145. esphome/components/esp32_touch/esp32_touch_v1.cpp +238 -0
  146. esphome/components/esp32_touch/esp32_touch_v2.cpp +397 -0
  147. esphome/components/esp8266/__init__.py +1 -0
  148. esphome/components/esp8266/gpio.cpp +10 -10
  149. esphome/components/esp8266/helpers.cpp +31 -0
  150. esphome/components/esphome/ota/__init__.py +1 -0
  151. esphome/components/esphome/ota/ota_esphome.cpp +24 -19
  152. esphome/components/ethernet/__init__.py +42 -23
  153. esphome/components/ethernet/esp_eth_phy_jl1101.c +0 -16
  154. esphome/components/ethernet/ethernet_component.cpp +69 -29
  155. esphome/components/ethernet/ethernet_component.h +18 -10
  156. esphome/components/event/__init__.py +5 -2
  157. esphome/components/ezo/ezo.h +0 -1
  158. esphome/components/ezo_pmp/ezo_pmp.h +0 -1
  159. esphome/components/fan/__init__.py +5 -2
  160. esphome/components/feedback/feedback_cover.h +0 -1
  161. esphome/components/font/__init__.py +92 -82
  162. esphome/components/font/font.cpp +9 -2
  163. esphome/components/font/font.h +20 -5
  164. esphome/components/fs3000/fs3000.h +0 -1
  165. esphome/components/gcja5/gcja5.h +0 -1
  166. esphome/components/gl_r01_i2c/__init__.py +0 -0
  167. esphome/components/gl_r01_i2c/gl_r01_i2c.cpp +68 -0
  168. esphome/components/gl_r01_i2c/gl_r01_i2c.h +22 -0
  169. esphome/components/gl_r01_i2c/sensor.py +36 -0
  170. esphome/components/gp8403/gp8403.h +0 -1
  171. esphome/components/gpio/binary_sensor/__init__.py +17 -0
  172. esphome/components/gpio/binary_sensor/gpio_binary_sensor.cpp +77 -3
  173. esphome/components/gpio/binary_sensor/gpio_binary_sensor.h +40 -0
  174. esphome/components/grove_gas_mc_v2/grove_gas_mc_v2.h +0 -2
  175. esphome/components/he60r/he60r.h +0 -1
  176. esphome/components/heatpumpir/climate.py +2 -1
  177. esphome/components/heatpumpir/heatpumpir.cpp +1 -0
  178. esphome/components/heatpumpir/heatpumpir.h +1 -0
  179. esphome/components/honeywellabp2_i2c/honeywellabp2.h +0 -1
  180. esphome/components/host/__init__.py +2 -1
  181. esphome/components/host/helpers.cpp +57 -0
  182. esphome/components/http_request/__init__.py +19 -1
  183. esphome/components/http_request/http_request.h +1 -1
  184. esphome/components/http_request/http_request_arduino.cpp +0 -1
  185. esphome/components/http_request/http_request_arduino.h +1 -0
  186. esphome/components/http_request/http_request_idf.cpp +0 -1
  187. esphome/components/http_request/ota/ota_http_request.cpp +1 -1
  188. esphome/components/http_request/update/http_request_update.cpp +28 -9
  189. esphome/components/hydreon_rgxx/hydreon_rgxx.cpp +3 -9
  190. esphome/components/hydreon_rgxx/sensor.py +1 -1
  191. esphome/components/i2c/__init__.py +23 -11
  192. esphome/components/i2c/i2c_bus.h +8 -1
  193. esphome/components/i2c/i2c_bus_arduino.cpp +4 -3
  194. esphome/components/i2c/i2c_bus_arduino.h +6 -3
  195. esphome/components/i2c/i2c_bus_esp_idf.h +5 -3
  196. esphome/components/i2c_device/i2c_device.h +0 -1
  197. esphome/components/i2s_audio/__init__.py +2 -10
  198. esphome/components/i2s_audio/i2s_audio.cpp +1 -5
  199. esphome/components/i2s_audio/media_player/__init__.py +2 -2
  200. esphome/components/i2s_audio/speaker/i2s_audio_speaker.cpp +2 -2
  201. esphome/components/iaqcore/iaqcore.h +0 -2
  202. esphome/components/image/__init__.py +123 -24
  203. esphome/components/improv_serial/improv_serial_component.cpp +0 -4
  204. esphome/components/ina219/ina219.cpp +7 -0
  205. esphome/components/ina219/ina219.h +1 -0
  206. esphome/components/ina260/ina260.h +0 -2
  207. esphome/components/inkbird_ibsth1_mini/inkbird_ibsth1_mini.h +0 -1
  208. esphome/components/inkplate6/display.py +15 -0
  209. esphome/components/inkplate6/inkplate.cpp +2 -2
  210. esphome/components/integration/integration_sensor.h +0 -1
  211. esphome/components/internal_temperature/internal_temperature.cpp +8 -27
  212. esphome/components/internal_temperature/sensor.py +0 -26
  213. esphome/components/interval/interval.h +0 -2
  214. esphome/components/ld2410/button/__init__.py +3 -3
  215. esphome/components/ld2410/button/factory_reset_button.cpp +9 -0
  216. esphome/components/ld2410/button/{reset_button.h → factory_reset_button.h} +2 -2
  217. esphome/components/ld2410/ld2410.cpp +430 -261
  218. esphome/components/ld2410/ld2410.h +44 -146
  219. esphome/components/ld2410/number/__init__.py +2 -2
  220. esphome/components/ld2410/sensor.py +1 -1
  221. esphome/components/ld2410/switch/__init__.py +1 -1
  222. esphome/components/ld2420/ld2420.cpp +196 -100
  223. esphome/components/ld2420/ld2420.h +46 -118
  224. esphome/components/ld2420/number/__init__.py +2 -2
  225. esphome/components/ld2420/sensor/__init__.py +6 -2
  226. esphome/components/ld2420/sensor/ld2420_sensor.h +1 -1
  227. esphome/components/ld2450/button/__init__.py +3 -3
  228. esphome/components/ld2450/button/factory_reset_button.cpp +9 -0
  229. esphome/components/ld2450/button/{reset_button.h → factory_reset_button.h} +2 -2
  230. esphome/components/ld2450/ld2450.cpp +384 -232
  231. esphome/components/ld2450/ld2450.h +60 -69
  232. esphome/components/ld2450/switch/__init__.py +1 -1
  233. esphome/components/ledc/ledc_output.cpp +1 -63
  234. esphome/components/libretiny/__init__.py +4 -3
  235. esphome/components/libretiny/const.py +5 -0
  236. esphome/components/libretiny/generate_components.py +1 -0
  237. esphome/components/libretiny/helpers.cpp +35 -0
  238. esphome/components/libretiny/lt_component.cpp +5 -3
  239. esphome/components/light/__init__.py +4 -2
  240. esphome/components/light/addressable_light.h +3 -3
  241. esphome/components/light/light_call.cpp +180 -243
  242. esphome/components/light/light_call.h +72 -20
  243. esphome/components/light/light_color_values.h +14 -14
  244. esphome/components/light/light_state.h +15 -13
  245. esphome/components/light/transformers.h +2 -2
  246. esphome/components/ln882x/__init__.py +52 -0
  247. esphome/components/ln882x/boards.py +285 -0
  248. esphome/components/lock/__init__.py +5 -2
  249. esphome/components/logger/__init__.py +40 -3
  250. esphome/components/logger/logger.cpp +47 -12
  251. esphome/components/logger/logger.h +80 -49
  252. esphome/components/logger/logger_esp32.cpp +3 -3
  253. esphome/components/lps22/__init__.py +0 -0
  254. esphome/components/lps22/lps22.cpp +75 -0
  255. esphome/components/lps22/lps22.h +27 -0
  256. esphome/components/lps22/sensor.py +58 -0
  257. esphome/components/ltr390/ltr390.h +0 -1
  258. esphome/components/ltr501/ltr501.h +0 -1
  259. esphome/components/ltr_als_ps/ltr_als_ps.h +0 -1
  260. esphome/components/lvgl/__init__.py +1 -1
  261. esphome/components/lvgl/schemas.py +66 -6
  262. esphome/components/lvgl/styles.py +24 -16
  263. esphome/components/lvgl/widgets/__init__.py +12 -2
  264. esphome/components/lvgl/widgets/lv_bar.py +40 -19
  265. esphome/components/m5stack_8angle/light/m5stack_8angle_light.cpp +1 -1
  266. esphome/components/max9611/max9611.h +0 -1
  267. esphome/components/mcp23016/__init__.py +1 -1
  268. esphome/components/mcp23xxx_base/__init__.py +1 -1
  269. esphome/components/mcp4461/__init__.py +1 -1
  270. esphome/components/mcp4461/output/__init__.py +3 -2
  271. esphome/components/mcp9600/mcp9600.h +0 -2
  272. esphome/components/md5/md5.cpp +3 -3
  273. esphome/components/md5/md5.h +1 -6
  274. esphome/components/mdns/__init__.py +22 -11
  275. esphome/components/media_player/__init__.py +4 -3
  276. esphome/components/micro_wake_word/__init__.py +1 -5
  277. esphome/components/micro_wake_word/streaming_model.cpp +2 -2
  278. esphome/components/microphone/microphone.cpp +7 -9
  279. esphome/components/microphone/microphone.h +0 -2
  280. esphome/components/mipi_spi/display.py +1 -0
  281. esphome/components/mmc5603/mmc5603.cpp +1 -1
  282. esphome/components/modbus/modbus.cpp +33 -15
  283. esphome/components/modbus/modbus.h +9 -0
  284. esphome/components/modbus_controller/__init__.py +42 -10
  285. esphome/components/modbus_controller/modbus_controller.cpp +92 -11
  286. esphome/components/modbus_controller/modbus_controller.h +61 -7
  287. esphome/components/mopeka_pro_check/mopeka_pro_check.h +0 -1
  288. esphome/components/mopeka_std_check/mopeka_std_check.h +0 -1
  289. esphome/components/mpl3115a2/mpl3115a2.h +0 -2
  290. esphome/components/mqtt/__init__.py +16 -0
  291. esphome/components/mqtt/mqtt_backend.h +2 -1
  292. esphome/components/mqtt/mqtt_backend_esp32.cpp +126 -45
  293. esphome/components/mqtt/mqtt_backend_esp32.h +106 -4
  294. esphome/components/mqtt/mqtt_client.cpp +15 -9
  295. esphome/components/mqtt/mqtt_client.h +8 -3
  296. esphome/components/ms8607/ms8607.h +0 -1
  297. esphome/components/neopixelbus/light.py +4 -1
  298. esphome/components/neopixelbus/neopixelbus_light.h +1 -1
  299. esphome/components/network/__init__.py +4 -1
  300. esphome/components/network/ip_address.h +1 -0
  301. esphome/components/nextion/__init__.py +16 -0
  302. esphome/components/nextion/base_component.py +1 -0
  303. esphome/components/nextion/binary_sensor/nextion_binarysensor.cpp +1 -1
  304. esphome/components/nextion/display.py +14 -4
  305. esphome/components/nextion/nextion.cpp +166 -101
  306. esphome/components/nextion/nextion.h +84 -53
  307. esphome/components/nextion/nextion_commands.cpp +11 -10
  308. esphome/components/nextion/nextion_component.cpp +28 -28
  309. esphome/components/nextion/nextion_component.h +53 -18
  310. esphome/components/nextion/nextion_component_base.h +3 -0
  311. esphome/components/nextion/nextion_upload.cpp +36 -0
  312. esphome/components/nextion/nextion_upload_arduino.cpp +10 -35
  313. esphome/components/nextion/nextion_upload_idf.cpp +9 -33
  314. esphome/components/nextion/sensor/nextion_sensor.cpp +1 -1
  315. esphome/components/nextion/switch/nextion_switch.cpp +1 -1
  316. esphome/components/nextion/text_sensor/nextion_textsensor.cpp +1 -1
  317. esphome/components/nfc/nfc.cpp +3 -22
  318. esphome/components/nfc/nfc.h +3 -3
  319. esphome/components/number/__init__.py +5 -2
  320. esphome/components/online_image/__init__.py +5 -0
  321. esphome/components/online_image/online_image.cpp +6 -2
  322. esphome/components/online_image/online_image.h +4 -1
  323. esphome/components/opentherm/opentherm.cpp +7 -12
  324. esphome/components/openthread/__init__.py +47 -40
  325. esphome/components/openthread/const.py +1 -0
  326. esphome/components/openthread/openthread_esp.cpp +27 -5
  327. esphome/components/opt3001/__init__.py +0 -0
  328. esphome/components/opt3001/opt3001.cpp +122 -0
  329. esphome/components/opt3001/opt3001.h +27 -0
  330. esphome/components/opt3001/sensor.py +35 -0
  331. esphome/components/ota/__init__.py +17 -0
  332. esphome/components/ota/ota_backend.h +27 -1
  333. esphome/components/ota/ota_backend_arduino_esp32.cpp +12 -2
  334. esphome/components/ota/ota_backend_arduino_esp32.h +3 -0
  335. esphome/components/ota/ota_backend_arduino_esp8266.cpp +18 -4
  336. esphome/components/ota/ota_backend_arduino_esp8266.h +3 -0
  337. esphome/components/ota/ota_backend_arduino_libretiny.cpp +12 -2
  338. esphome/components/ota/ota_backend_arduino_libretiny.h +3 -0
  339. esphome/components/ota/ota_backend_arduino_rp2040.cpp +9 -2
  340. esphome/components/ota/ota_backend_arduino_rp2040.h +3 -0
  341. esphome/components/ota/ota_backend_esp_idf.cpp +10 -16
  342. esphome/components/ota/ota_backend_esp_idf.h +1 -0
  343. esphome/components/packages/__init__.py +5 -2
  344. esphome/components/packet_transport/binary_sensor.py +61 -4
  345. esphome/components/packet_transport/packet_transport.cpp +31 -1
  346. esphome/components/packet_transport/packet_transport.h +11 -5
  347. esphome/components/pcf8574/__init__.py +1 -1
  348. esphome/components/pi4ioe5v6408/__init__.py +84 -0
  349. esphome/components/pi4ioe5v6408/pi4ioe5v6408.cpp +171 -0
  350. esphome/components/pi4ioe5v6408/pi4ioe5v6408.h +70 -0
  351. esphome/components/pmsa003i/pmsa003i.h +0 -1
  352. esphome/components/pmsx003/pmsx003.h +0 -1
  353. esphome/components/pn7150/pn7150.cpp +7 -7
  354. esphome/components/pn7150/pn7150.h +0 -1
  355. esphome/components/pn7160/pn7160.cpp +7 -7
  356. esphome/components/pn7160/pn7160.h +0 -1
  357. esphome/components/preferences/syncer.h +2 -0
  358. esphome/components/prometheus/prometheus_handler.h +1 -1
  359. esphome/components/psram/psram.cpp +0 -20
  360. esphome/components/pulse_counter/pulse_counter_sensor.h +0 -1
  361. esphome/components/pulse_meter/pulse_meter_sensor.cpp +8 -4
  362. esphome/components/pulse_width/pulse_width.h +0 -1
  363. esphome/components/pvvx_mithermometer/display/pvvx_display.cpp +0 -4
  364. esphome/components/pvvx_mithermometer/display/pvvx_display.h +0 -2
  365. esphome/components/pvvx_mithermometer/pvvx_mithermometer.h +0 -1
  366. esphome/components/qr_code/__init__.py +13 -10
  367. esphome/components/qwiic_pir/qwiic_pir.h +0 -1
  368. esphome/components/radon_eye_ble/radon_eye_listener.cpp +1 -1
  369. esphome/components/rc522/rc522.h +0 -1
  370. esphome/components/rdm6300/rdm6300.h +0 -2
  371. esphome/components/remote_base/__init__.py +7 -5
  372. esphome/components/remote_base/remote_base.cpp +24 -21
  373. esphome/components/remote_base/remote_base.h +3 -26
  374. esphome/components/remote_receiver/__init__.py +40 -46
  375. esphome/components/remote_receiver/remote_receiver.h +4 -18
  376. esphome/components/remote_receiver/remote_receiver_esp32.cpp +0 -87
  377. esphome/components/remote_receiver/remote_receiver_esp8266.cpp +1 -1
  378. esphome/components/remote_transmitter/__init__.py +42 -43
  379. esphome/components/remote_transmitter/remote_transmitter.h +2 -14
  380. esphome/components/remote_transmitter/remote_transmitter_esp32.cpp +0 -77
  381. esphome/components/resistance/resistance_sensor.h +0 -1
  382. esphome/components/rp2040/__init__.py +1 -0
  383. esphome/components/rp2040/helpers.cpp +55 -0
  384. esphome/components/rp2040_pio_led_strip/led_strip.cpp +2 -2
  385. esphome/components/rpi_dpi_rgb/rpi_dpi_rgb.cpp +0 -4
  386. esphome/components/rtttl/__init__.py +4 -4
  387. esphome/components/rtttl/rtttl.cpp +10 -1
  388. esphome/components/ruuvitag/ruuvitag.h +0 -1
  389. esphome/components/safe_mode/safe_mode.cpp +2 -0
  390. esphome/components/safe_mode/safe_mode.h +4 -1
  391. esphome/components/scd30/scd30.h +0 -1
  392. esphome/components/scd30/sensor.py +2 -2
  393. esphome/components/scd4x/scd4x.cpp +61 -54
  394. esphome/components/scd4x/scd4x.h +17 -15
  395. esphome/components/scd4x/sensor.py +4 -4
  396. esphome/components/script/script.h +0 -2
  397. esphome/components/sdp3x/sensor.py +1 -1
  398. esphome/components/select/__init__.py +5 -2
  399. esphome/components/sen5x/sen5x.h +0 -1
  400. esphome/components/senseair/senseair.h +0 -1
  401. esphome/components/sensor/__init__.py +4 -2
  402. esphome/components/sensor/filter.cpp +1 -1
  403. esphome/components/sensor/sensor.cpp +12 -6
  404. esphome/components/sensor/sensor.h +13 -5
  405. esphome/components/servo/servo.h +0 -1
  406. esphome/components/sfa30/sfa30.h +0 -1
  407. esphome/components/sgp30/sgp30.h +0 -1
  408. esphome/components/sgp4x/sgp4x.h +0 -1
  409. esphome/components/shelly_dimmer/stm32flash.cpp +1 -2
  410. esphome/components/sht4x/sht4x.h +0 -1
  411. esphome/components/sm300d2/sm300d2.h +0 -2
  412. esphome/components/smt100/sensor.py +8 -4
  413. esphome/components/smt100/smt100.cpp +5 -5
  414. esphome/components/smt100/smt100.h +3 -3
  415. esphome/components/sn74hc595/__init__.py +1 -1
  416. esphome/components/sn74hc595/sn74hc595.cpp +5 -4
  417. esphome/components/sntp/sntp_component.cpp +9 -3
  418. esphome/components/sntp/time.py +2 -0
  419. esphome/components/socket/__init__.py +17 -0
  420. esphome/components/spi/__init__.py +27 -6
  421. esphome/components/spi/spi.cpp +3 -2
  422. esphome/components/spi/spi.h +9 -3
  423. esphome/components/spi/spi_arduino.cpp +3 -5
  424. esphome/components/spi/spi_esp_idf.cpp +40 -21
  425. esphome/components/spi_led_strip/spi_led_strip.cpp +1 -1
  426. esphome/components/sps30/sps30.h +0 -1
  427. esphome/components/ssd1306_base/ssd1306_base.cpp +1 -1
  428. esphome/components/st7701s/st7701s.cpp +0 -4
  429. esphome/components/status/status_binary_sensor.h +0 -2
  430. esphome/components/substitutions/__init__.py +76 -19
  431. esphome/components/substitutions/jinja.py +99 -0
  432. esphome/components/sun/sun.cpp +3 -4
  433. esphome/components/switch/__init__.py +5 -2
  434. esphome/components/switch/binary_sensor/switch_binary_sensor.h +0 -1
  435. esphome/components/sx126x/__init__.py +317 -0
  436. esphome/components/sx126x/automation.h +62 -0
  437. esphome/components/sx126x/packet_transport/__init__.py +26 -0
  438. esphome/components/sx126x/packet_transport/sx126x_transport.cpp +26 -0
  439. esphome/components/sx126x/packet_transport/sx126x_transport.h +25 -0
  440. esphome/components/sx126x/sx126x.cpp +523 -0
  441. esphome/components/sx126x/sx126x.h +140 -0
  442. esphome/components/sx126x/sx126x_reg.h +163 -0
  443. esphome/components/sx127x/__init__.py +325 -0
  444. esphome/components/sx127x/automation.h +62 -0
  445. esphome/components/sx127x/packet_transport/__init__.py +26 -0
  446. esphome/components/sx127x/packet_transport/sx127x_transport.cpp +26 -0
  447. esphome/components/sx127x/packet_transport/sx127x_transport.h +25 -0
  448. esphome/components/sx127x/sx127x.cpp +498 -0
  449. esphome/components/sx127x/sx127x.h +128 -0
  450. esphome/components/sx127x/sx127x_reg.h +295 -0
  451. esphome/components/syslog/esphome_syslog.cpp +5 -3
  452. esphome/components/syslog/esphome_syslog.h +1 -1
  453. esphome/components/tca9555/__init__.py +1 -1
  454. esphome/components/template/binary_sensor/template_binary_sensor.cpp +1 -9
  455. esphome/components/text/__init__.py +5 -2
  456. esphome/components/text_sensor/__init__.py +5 -2
  457. esphome/components/thermostat/thermostat_climate.cpp +34 -31
  458. esphome/components/thermostat/thermostat_climate.h +43 -39
  459. esphome/components/time/__init__.py +16 -2
  460. esphome/components/time/real_time_clock.cpp +4 -0
  461. esphome/components/time/real_time_clock.h +5 -1
  462. esphome/components/tlc5971/tlc5971.cpp +4 -1
  463. esphome/components/tmp1075/tmp1075.h +0 -2
  464. esphome/components/tof10120/tof10120_sensor.h +0 -1
  465. esphome/components/tormatic/tormatic_cover.h +0 -1
  466. esphome/components/total_daily_energy/total_daily_energy.h +0 -1
  467. esphome/components/tsl2591/tsl2591.cpp +1 -1
  468. esphome/components/ttp229_bsf/ttp229_bsf.h +0 -1
  469. esphome/components/ttp229_lsf/ttp229_lsf.h +0 -1
  470. esphome/components/tx20/tx20.cpp +2 -2
  471. esphome/components/uart/__init__.py +18 -0
  472. esphome/components/uart/uart_component_esp_idf.cpp +1 -5
  473. esphome/components/update/__init__.py +5 -2
  474. esphome/components/update/update_entity.h +8 -0
  475. esphome/components/usb_host/__init__.py +5 -2
  476. esphome/components/valve/__init__.py +5 -2
  477. esphome/components/vbus/vbus.h +0 -1
  478. esphome/components/veml3235/veml3235.h +0 -1
  479. esphome/components/veml7700/veml7700.h +0 -1
  480. esphome/components/vl53l0x/vl53l0x_sensor.h +0 -1
  481. esphome/components/voice_assistant/voice_assistant.cpp +4 -4
  482. esphome/components/watchdog/watchdog.cpp +0 -4
  483. esphome/components/waveshare_epaper/waveshare_epaper.cpp +6 -6
  484. esphome/components/web_server/__init__.py +34 -19
  485. esphome/components/web_server/ota/__init__.py +32 -0
  486. esphome/components/web_server/ota/ota_web_server.cpp +210 -0
  487. esphome/components/web_server/ota/ota_web_server.h +26 -0
  488. esphome/components/web_server/web_server.cpp +311 -430
  489. esphome/components/web_server/web_server.h +33 -23
  490. esphome/components/web_server/web_server_v1.cpp +4 -5
  491. esphome/components/web_server_base/__init__.py +5 -2
  492. esphome/components/web_server_base/web_server_base.cpp +2 -94
  493. esphome/components/web_server_base/web_server_base.h +5 -25
  494. esphome/components/web_server_idf/multipart.cpp +254 -0
  495. esphome/components/web_server_idf/multipart.h +86 -0
  496. esphome/components/web_server_idf/utils.cpp +32 -0
  497. esphome/components/web_server_idf/utils.h +10 -0
  498. esphome/components/web_server_idf/web_server_idf.cpp +162 -16
  499. esphome/components/web_server_idf/web_server_idf.h +11 -10
  500. esphome/components/wiegand/wiegand.cpp +2 -2
  501. esphome/components/wifi/__init__.py +18 -0
  502. esphome/components/wifi/wifi_component.cpp +17 -22
  503. esphome/components/wifi/wifi_component.h +27 -23
  504. esphome/components/wifi/wifi_component_esp32_arduino.cpp +52 -59
  505. esphome/components/wifi/wifi_component_esp8266.cpp +46 -46
  506. esphome/components/wifi/wifi_component_esp_idf.cpp +35 -36
  507. esphome/components/wifi/wifi_component_libretiny.cpp +26 -27
  508. esphome/components/wifi/wifi_component_pico_w.cpp +3 -3
  509. esphome/components/wifi_info/wifi_info_text_sensor.cpp +6 -6
  510. esphome/components/wireguard/__init__.py +2 -11
  511. esphome/components/xiaomi_ble/xiaomi_ble.cpp +13 -1
  512. esphome/components/xiaomi_ble/xiaomi_ble.h +1 -0
  513. esphome/components/xiaomi_cgd1/xiaomi_cgd1.h +0 -1
  514. esphome/components/xiaomi_cgdk2/xiaomi_cgdk2.h +0 -1
  515. esphome/components/xiaomi_cgg1/xiaomi_cgg1.h +0 -1
  516. esphome/components/xiaomi_cgpr1/xiaomi_cgpr1.h +0 -1
  517. esphome/components/xiaomi_gcls002/xiaomi_gcls002.h +0 -1
  518. esphome/components/xiaomi_hhccjcy01/xiaomi_hhccjcy01.h +0 -1
  519. esphome/components/xiaomi_hhccjcy10/xiaomi_hhccjcy10.h +0 -1
  520. esphome/components/xiaomi_hhccpot002/xiaomi_hhccpot002.h +0 -1
  521. esphome/components/xiaomi_jqjcy01ym/xiaomi_jqjcy01ym.h +0 -1
  522. esphome/components/xiaomi_lywsd02/xiaomi_lywsd02.h +0 -1
  523. esphome/components/xiaomi_lywsd02mmc/xiaomi_lywsd02mmc.h +0 -1
  524. esphome/components/xiaomi_lywsd03mmc/xiaomi_lywsd03mmc.h +0 -1
  525. esphome/components/xiaomi_lywsdcgq/xiaomi_lywsdcgq.h +0 -1
  526. esphome/components/xiaomi_mhoc303/xiaomi_mhoc303.h +0 -1
  527. esphome/components/xiaomi_mhoc401/xiaomi_mhoc401.h +0 -1
  528. esphome/components/xiaomi_miscale/xiaomi_miscale.h +0 -1
  529. esphome/components/xiaomi_mjyd02yla/xiaomi_mjyd02yla.h +0 -1
  530. esphome/components/xiaomi_mue4094rt/xiaomi_mue4094rt.h +0 -1
  531. esphome/components/xiaomi_rtcgq02lm/xiaomi_rtcgq02lm.h +0 -1
  532. esphome/components/xiaomi_wx08zm/xiaomi_wx08zm.h +0 -1
  533. esphome/components/xiaomi_xmwsdj04mmc/__init__.py +0 -0
  534. esphome/components/xiaomi_xmwsdj04mmc/sensor.py +77 -0
  535. esphome/components/xiaomi_xmwsdj04mmc/xiaomi_xmwsdj04mmc.cpp +77 -0
  536. esphome/components/xiaomi_xmwsdj04mmc/xiaomi_xmwsdj04mmc.h +36 -0
  537. esphome/components/zio_ultrasonic/zio_ultrasonic.h +0 -2
  538. esphome/components/zyaura/zyaura.h +0 -1
  539. esphome/config.py +88 -22
  540. esphome/config_helpers.py +74 -1
  541. esphome/config_validation.py +12 -1
  542. esphome/const.py +65 -10
  543. esphome/core/__init__.py +18 -2
  544. esphome/core/application.cpp +163 -10
  545. esphome/core/application.h +145 -165
  546. esphome/core/area.h +19 -0
  547. esphome/core/automation.h +58 -9
  548. esphome/core/color.cpp +3 -5
  549. esphome/core/color.h +16 -16
  550. esphome/core/component.cpp +151 -18
  551. esphome/core/component.h +98 -4
  552. esphome/core/component_iterator.cpp +7 -7
  553. esphome/core/component_iterator.h +9 -7
  554. esphome/core/config.py +155 -6
  555. esphome/core/controller.cpp +4 -2
  556. esphome/core/controller.h +1 -1
  557. esphome/core/datatypes.h +2 -2
  558. esphome/core/defines.h +17 -2
  559. esphome/core/device.h +20 -0
  560. esphome/core/entity_base.cpp +20 -15
  561. esphome/core/entity_base.h +76 -0
  562. esphome/core/entity_helpers.py +162 -1
  563. esphome/core/event_pool.h +81 -0
  564. esphome/core/helpers.cpp +75 -230
  565. esphome/core/helpers.h +164 -104
  566. esphome/core/lock_free_queue.h +151 -0
  567. esphome/core/log.cpp +2 -2
  568. esphome/core/log.h +2 -0
  569. esphome/core/optional.h +5 -0
  570. esphome/core/ring_buffer.cpp +2 -2
  571. esphome/core/scheduler.cpp +278 -103
  572. esphome/core/scheduler.h +157 -17
  573. esphome/core/time.cpp +5 -5
  574. esphome/core/time.h +5 -5
  575. esphome/cpp_generator.py +17 -0
  576. esphome/cpp_helpers.py +0 -22
  577. esphome/cpp_types.py +3 -1
  578. esphome/dashboard/entries.py +1 -1
  579. esphome/dashboard/util/text.py +5 -21
  580. esphome/dashboard/web_server.py +9 -1
  581. esphome/helpers.py +47 -0
  582. esphome/loader.py +15 -1
  583. esphome/pins.py +14 -8
  584. esphome/wizard.py +16 -3
  585. esphome/writer.py +21 -3
  586. esphome/yaml_util.py +0 -2
  587. {esphome-2025.6.2.dist-info → esphome-2025.7.0b1.dist-info}/METADATA +10 -9
  588. {esphome-2025.6.2.dist-info → esphome-2025.7.0b1.dist-info}/RECORD +593 -533
  589. esphome/components/esp32_ble/ble_event_pool.h +0 -72
  590. esphome/components/esp32_ble/queue.h +0 -85
  591. esphome/components/esp32_hall/esp32_hall.cpp +0 -25
  592. esphome/components/esp32_hall/esp32_hall.h +0 -23
  593. esphome/components/esp32_touch/esp32_touch.cpp +0 -355
  594. esphome/components/ld2410/button/reset_button.cpp +0 -9
  595. esphome/components/ld2450/button/reset_button.cpp +0 -9
  596. esphome/components/openthread/tlv.py +0 -65
  597. /esphome/{dashboard/enum.py → enum.py} +0 -0
  598. {esphome-2025.6.2.dist-info → esphome-2025.7.0b1.dist-info}/WHEEL +0 -0
  599. {esphome-2025.6.2.dist-info → esphome-2025.7.0b1.dist-info}/entry_points.txt +0 -0
  600. {esphome-2025.6.2.dist-info → esphome-2025.7.0b1.dist-info}/licenses/LICENSE +0 -0
  601. {esphome-2025.6.2.dist-info → esphome-2025.7.0b1.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,4333 @@
1
+ // This file was automatically generated with a tool.
2
+ // See script/api_protobuf/api_protobuf.py
3
+ #include "api_pb2.h"
4
+ #include "esphome/core/helpers.h"
5
+
6
+ #include <cinttypes>
7
+
8
+ #ifdef HAS_PROTO_MESSAGE_DUMP
9
+
10
+ namespace esphome {
11
+ namespace api {
12
+
13
+ template<> const char *proto_enum_to_string<enums::EntityCategory>(enums::EntityCategory value) {
14
+ switch (value) {
15
+ case enums::ENTITY_CATEGORY_NONE:
16
+ return "ENTITY_CATEGORY_NONE";
17
+ case enums::ENTITY_CATEGORY_CONFIG:
18
+ return "ENTITY_CATEGORY_CONFIG";
19
+ case enums::ENTITY_CATEGORY_DIAGNOSTIC:
20
+ return "ENTITY_CATEGORY_DIAGNOSTIC";
21
+ default:
22
+ return "UNKNOWN";
23
+ }
24
+ }
25
+ #ifdef USE_COVER
26
+ template<> const char *proto_enum_to_string<enums::LegacyCoverState>(enums::LegacyCoverState value) {
27
+ switch (value) {
28
+ case enums::LEGACY_COVER_STATE_OPEN:
29
+ return "LEGACY_COVER_STATE_OPEN";
30
+ case enums::LEGACY_COVER_STATE_CLOSED:
31
+ return "LEGACY_COVER_STATE_CLOSED";
32
+ default:
33
+ return "UNKNOWN";
34
+ }
35
+ }
36
+ template<> const char *proto_enum_to_string<enums::CoverOperation>(enums::CoverOperation value) {
37
+ switch (value) {
38
+ case enums::COVER_OPERATION_IDLE:
39
+ return "COVER_OPERATION_IDLE";
40
+ case enums::COVER_OPERATION_IS_OPENING:
41
+ return "COVER_OPERATION_IS_OPENING";
42
+ case enums::COVER_OPERATION_IS_CLOSING:
43
+ return "COVER_OPERATION_IS_CLOSING";
44
+ default:
45
+ return "UNKNOWN";
46
+ }
47
+ }
48
+ template<> const char *proto_enum_to_string<enums::LegacyCoverCommand>(enums::LegacyCoverCommand value) {
49
+ switch (value) {
50
+ case enums::LEGACY_COVER_COMMAND_OPEN:
51
+ return "LEGACY_COVER_COMMAND_OPEN";
52
+ case enums::LEGACY_COVER_COMMAND_CLOSE:
53
+ return "LEGACY_COVER_COMMAND_CLOSE";
54
+ case enums::LEGACY_COVER_COMMAND_STOP:
55
+ return "LEGACY_COVER_COMMAND_STOP";
56
+ default:
57
+ return "UNKNOWN";
58
+ }
59
+ }
60
+ #endif
61
+ #ifdef USE_FAN
62
+ template<> const char *proto_enum_to_string<enums::FanSpeed>(enums::FanSpeed value) {
63
+ switch (value) {
64
+ case enums::FAN_SPEED_LOW:
65
+ return "FAN_SPEED_LOW";
66
+ case enums::FAN_SPEED_MEDIUM:
67
+ return "FAN_SPEED_MEDIUM";
68
+ case enums::FAN_SPEED_HIGH:
69
+ return "FAN_SPEED_HIGH";
70
+ default:
71
+ return "UNKNOWN";
72
+ }
73
+ }
74
+ template<> const char *proto_enum_to_string<enums::FanDirection>(enums::FanDirection value) {
75
+ switch (value) {
76
+ case enums::FAN_DIRECTION_FORWARD:
77
+ return "FAN_DIRECTION_FORWARD";
78
+ case enums::FAN_DIRECTION_REVERSE:
79
+ return "FAN_DIRECTION_REVERSE";
80
+ default:
81
+ return "UNKNOWN";
82
+ }
83
+ }
84
+ #endif
85
+ #ifdef USE_LIGHT
86
+ template<> const char *proto_enum_to_string<enums::ColorMode>(enums::ColorMode value) {
87
+ switch (value) {
88
+ case enums::COLOR_MODE_UNKNOWN:
89
+ return "COLOR_MODE_UNKNOWN";
90
+ case enums::COLOR_MODE_ON_OFF:
91
+ return "COLOR_MODE_ON_OFF";
92
+ case enums::COLOR_MODE_LEGACY_BRIGHTNESS:
93
+ return "COLOR_MODE_LEGACY_BRIGHTNESS";
94
+ case enums::COLOR_MODE_BRIGHTNESS:
95
+ return "COLOR_MODE_BRIGHTNESS";
96
+ case enums::COLOR_MODE_WHITE:
97
+ return "COLOR_MODE_WHITE";
98
+ case enums::COLOR_MODE_COLOR_TEMPERATURE:
99
+ return "COLOR_MODE_COLOR_TEMPERATURE";
100
+ case enums::COLOR_MODE_COLD_WARM_WHITE:
101
+ return "COLOR_MODE_COLD_WARM_WHITE";
102
+ case enums::COLOR_MODE_RGB:
103
+ return "COLOR_MODE_RGB";
104
+ case enums::COLOR_MODE_RGB_WHITE:
105
+ return "COLOR_MODE_RGB_WHITE";
106
+ case enums::COLOR_MODE_RGB_COLOR_TEMPERATURE:
107
+ return "COLOR_MODE_RGB_COLOR_TEMPERATURE";
108
+ case enums::COLOR_MODE_RGB_COLD_WARM_WHITE:
109
+ return "COLOR_MODE_RGB_COLD_WARM_WHITE";
110
+ default:
111
+ return "UNKNOWN";
112
+ }
113
+ }
114
+ #endif
115
+ #ifdef USE_SENSOR
116
+ template<> const char *proto_enum_to_string<enums::SensorStateClass>(enums::SensorStateClass value) {
117
+ switch (value) {
118
+ case enums::STATE_CLASS_NONE:
119
+ return "STATE_CLASS_NONE";
120
+ case enums::STATE_CLASS_MEASUREMENT:
121
+ return "STATE_CLASS_MEASUREMENT";
122
+ case enums::STATE_CLASS_TOTAL_INCREASING:
123
+ return "STATE_CLASS_TOTAL_INCREASING";
124
+ case enums::STATE_CLASS_TOTAL:
125
+ return "STATE_CLASS_TOTAL";
126
+ default:
127
+ return "UNKNOWN";
128
+ }
129
+ }
130
+ template<> const char *proto_enum_to_string<enums::SensorLastResetType>(enums::SensorLastResetType value) {
131
+ switch (value) {
132
+ case enums::LAST_RESET_NONE:
133
+ return "LAST_RESET_NONE";
134
+ case enums::LAST_RESET_NEVER:
135
+ return "LAST_RESET_NEVER";
136
+ case enums::LAST_RESET_AUTO:
137
+ return "LAST_RESET_AUTO";
138
+ default:
139
+ return "UNKNOWN";
140
+ }
141
+ }
142
+ #endif
143
+ template<> const char *proto_enum_to_string<enums::LogLevel>(enums::LogLevel value) {
144
+ switch (value) {
145
+ case enums::LOG_LEVEL_NONE:
146
+ return "LOG_LEVEL_NONE";
147
+ case enums::LOG_LEVEL_ERROR:
148
+ return "LOG_LEVEL_ERROR";
149
+ case enums::LOG_LEVEL_WARN:
150
+ return "LOG_LEVEL_WARN";
151
+ case enums::LOG_LEVEL_INFO:
152
+ return "LOG_LEVEL_INFO";
153
+ case enums::LOG_LEVEL_CONFIG:
154
+ return "LOG_LEVEL_CONFIG";
155
+ case enums::LOG_LEVEL_DEBUG:
156
+ return "LOG_LEVEL_DEBUG";
157
+ case enums::LOG_LEVEL_VERBOSE:
158
+ return "LOG_LEVEL_VERBOSE";
159
+ case enums::LOG_LEVEL_VERY_VERBOSE:
160
+ return "LOG_LEVEL_VERY_VERBOSE";
161
+ default:
162
+ return "UNKNOWN";
163
+ }
164
+ }
165
+ template<> const char *proto_enum_to_string<enums::ServiceArgType>(enums::ServiceArgType value) {
166
+ switch (value) {
167
+ case enums::SERVICE_ARG_TYPE_BOOL:
168
+ return "SERVICE_ARG_TYPE_BOOL";
169
+ case enums::SERVICE_ARG_TYPE_INT:
170
+ return "SERVICE_ARG_TYPE_INT";
171
+ case enums::SERVICE_ARG_TYPE_FLOAT:
172
+ return "SERVICE_ARG_TYPE_FLOAT";
173
+ case enums::SERVICE_ARG_TYPE_STRING:
174
+ return "SERVICE_ARG_TYPE_STRING";
175
+ case enums::SERVICE_ARG_TYPE_BOOL_ARRAY:
176
+ return "SERVICE_ARG_TYPE_BOOL_ARRAY";
177
+ case enums::SERVICE_ARG_TYPE_INT_ARRAY:
178
+ return "SERVICE_ARG_TYPE_INT_ARRAY";
179
+ case enums::SERVICE_ARG_TYPE_FLOAT_ARRAY:
180
+ return "SERVICE_ARG_TYPE_FLOAT_ARRAY";
181
+ case enums::SERVICE_ARG_TYPE_STRING_ARRAY:
182
+ return "SERVICE_ARG_TYPE_STRING_ARRAY";
183
+ default:
184
+ return "UNKNOWN";
185
+ }
186
+ }
187
+ #ifdef USE_CLIMATE
188
+ template<> const char *proto_enum_to_string<enums::ClimateMode>(enums::ClimateMode value) {
189
+ switch (value) {
190
+ case enums::CLIMATE_MODE_OFF:
191
+ return "CLIMATE_MODE_OFF";
192
+ case enums::CLIMATE_MODE_HEAT_COOL:
193
+ return "CLIMATE_MODE_HEAT_COOL";
194
+ case enums::CLIMATE_MODE_COOL:
195
+ return "CLIMATE_MODE_COOL";
196
+ case enums::CLIMATE_MODE_HEAT:
197
+ return "CLIMATE_MODE_HEAT";
198
+ case enums::CLIMATE_MODE_FAN_ONLY:
199
+ return "CLIMATE_MODE_FAN_ONLY";
200
+ case enums::CLIMATE_MODE_DRY:
201
+ return "CLIMATE_MODE_DRY";
202
+ case enums::CLIMATE_MODE_AUTO:
203
+ return "CLIMATE_MODE_AUTO";
204
+ default:
205
+ return "UNKNOWN";
206
+ }
207
+ }
208
+ template<> const char *proto_enum_to_string<enums::ClimateFanMode>(enums::ClimateFanMode value) {
209
+ switch (value) {
210
+ case enums::CLIMATE_FAN_ON:
211
+ return "CLIMATE_FAN_ON";
212
+ case enums::CLIMATE_FAN_OFF:
213
+ return "CLIMATE_FAN_OFF";
214
+ case enums::CLIMATE_FAN_AUTO:
215
+ return "CLIMATE_FAN_AUTO";
216
+ case enums::CLIMATE_FAN_LOW:
217
+ return "CLIMATE_FAN_LOW";
218
+ case enums::CLIMATE_FAN_MEDIUM:
219
+ return "CLIMATE_FAN_MEDIUM";
220
+ case enums::CLIMATE_FAN_HIGH:
221
+ return "CLIMATE_FAN_HIGH";
222
+ case enums::CLIMATE_FAN_MIDDLE:
223
+ return "CLIMATE_FAN_MIDDLE";
224
+ case enums::CLIMATE_FAN_FOCUS:
225
+ return "CLIMATE_FAN_FOCUS";
226
+ case enums::CLIMATE_FAN_DIFFUSE:
227
+ return "CLIMATE_FAN_DIFFUSE";
228
+ case enums::CLIMATE_FAN_QUIET:
229
+ return "CLIMATE_FAN_QUIET";
230
+ default:
231
+ return "UNKNOWN";
232
+ }
233
+ }
234
+ template<> const char *proto_enum_to_string<enums::ClimateSwingMode>(enums::ClimateSwingMode value) {
235
+ switch (value) {
236
+ case enums::CLIMATE_SWING_OFF:
237
+ return "CLIMATE_SWING_OFF";
238
+ case enums::CLIMATE_SWING_BOTH:
239
+ return "CLIMATE_SWING_BOTH";
240
+ case enums::CLIMATE_SWING_VERTICAL:
241
+ return "CLIMATE_SWING_VERTICAL";
242
+ case enums::CLIMATE_SWING_HORIZONTAL:
243
+ return "CLIMATE_SWING_HORIZONTAL";
244
+ default:
245
+ return "UNKNOWN";
246
+ }
247
+ }
248
+ template<> const char *proto_enum_to_string<enums::ClimateAction>(enums::ClimateAction value) {
249
+ switch (value) {
250
+ case enums::CLIMATE_ACTION_OFF:
251
+ return "CLIMATE_ACTION_OFF";
252
+ case enums::CLIMATE_ACTION_COOLING:
253
+ return "CLIMATE_ACTION_COOLING";
254
+ case enums::CLIMATE_ACTION_HEATING:
255
+ return "CLIMATE_ACTION_HEATING";
256
+ case enums::CLIMATE_ACTION_IDLE:
257
+ return "CLIMATE_ACTION_IDLE";
258
+ case enums::CLIMATE_ACTION_DRYING:
259
+ return "CLIMATE_ACTION_DRYING";
260
+ case enums::CLIMATE_ACTION_FAN:
261
+ return "CLIMATE_ACTION_FAN";
262
+ default:
263
+ return "UNKNOWN";
264
+ }
265
+ }
266
+ template<> const char *proto_enum_to_string<enums::ClimatePreset>(enums::ClimatePreset value) {
267
+ switch (value) {
268
+ case enums::CLIMATE_PRESET_NONE:
269
+ return "CLIMATE_PRESET_NONE";
270
+ case enums::CLIMATE_PRESET_HOME:
271
+ return "CLIMATE_PRESET_HOME";
272
+ case enums::CLIMATE_PRESET_AWAY:
273
+ return "CLIMATE_PRESET_AWAY";
274
+ case enums::CLIMATE_PRESET_BOOST:
275
+ return "CLIMATE_PRESET_BOOST";
276
+ case enums::CLIMATE_PRESET_COMFORT:
277
+ return "CLIMATE_PRESET_COMFORT";
278
+ case enums::CLIMATE_PRESET_ECO:
279
+ return "CLIMATE_PRESET_ECO";
280
+ case enums::CLIMATE_PRESET_SLEEP:
281
+ return "CLIMATE_PRESET_SLEEP";
282
+ case enums::CLIMATE_PRESET_ACTIVITY:
283
+ return "CLIMATE_PRESET_ACTIVITY";
284
+ default:
285
+ return "UNKNOWN";
286
+ }
287
+ }
288
+ #endif
289
+ #ifdef USE_NUMBER
290
+ template<> const char *proto_enum_to_string<enums::NumberMode>(enums::NumberMode value) {
291
+ switch (value) {
292
+ case enums::NUMBER_MODE_AUTO:
293
+ return "NUMBER_MODE_AUTO";
294
+ case enums::NUMBER_MODE_BOX:
295
+ return "NUMBER_MODE_BOX";
296
+ case enums::NUMBER_MODE_SLIDER:
297
+ return "NUMBER_MODE_SLIDER";
298
+ default:
299
+ return "UNKNOWN";
300
+ }
301
+ }
302
+ #endif
303
+ #ifdef USE_LOCK
304
+ template<> const char *proto_enum_to_string<enums::LockState>(enums::LockState value) {
305
+ switch (value) {
306
+ case enums::LOCK_STATE_NONE:
307
+ return "LOCK_STATE_NONE";
308
+ case enums::LOCK_STATE_LOCKED:
309
+ return "LOCK_STATE_LOCKED";
310
+ case enums::LOCK_STATE_UNLOCKED:
311
+ return "LOCK_STATE_UNLOCKED";
312
+ case enums::LOCK_STATE_JAMMED:
313
+ return "LOCK_STATE_JAMMED";
314
+ case enums::LOCK_STATE_LOCKING:
315
+ return "LOCK_STATE_LOCKING";
316
+ case enums::LOCK_STATE_UNLOCKING:
317
+ return "LOCK_STATE_UNLOCKING";
318
+ default:
319
+ return "UNKNOWN";
320
+ }
321
+ }
322
+ template<> const char *proto_enum_to_string<enums::LockCommand>(enums::LockCommand value) {
323
+ switch (value) {
324
+ case enums::LOCK_UNLOCK:
325
+ return "LOCK_UNLOCK";
326
+ case enums::LOCK_LOCK:
327
+ return "LOCK_LOCK";
328
+ case enums::LOCK_OPEN:
329
+ return "LOCK_OPEN";
330
+ default:
331
+ return "UNKNOWN";
332
+ }
333
+ }
334
+ #endif
335
+ #ifdef USE_MEDIA_PLAYER
336
+ template<> const char *proto_enum_to_string<enums::MediaPlayerState>(enums::MediaPlayerState value) {
337
+ switch (value) {
338
+ case enums::MEDIA_PLAYER_STATE_NONE:
339
+ return "MEDIA_PLAYER_STATE_NONE";
340
+ case enums::MEDIA_PLAYER_STATE_IDLE:
341
+ return "MEDIA_PLAYER_STATE_IDLE";
342
+ case enums::MEDIA_PLAYER_STATE_PLAYING:
343
+ return "MEDIA_PLAYER_STATE_PLAYING";
344
+ case enums::MEDIA_PLAYER_STATE_PAUSED:
345
+ return "MEDIA_PLAYER_STATE_PAUSED";
346
+ default:
347
+ return "UNKNOWN";
348
+ }
349
+ }
350
+ template<> const char *proto_enum_to_string<enums::MediaPlayerCommand>(enums::MediaPlayerCommand value) {
351
+ switch (value) {
352
+ case enums::MEDIA_PLAYER_COMMAND_PLAY:
353
+ return "MEDIA_PLAYER_COMMAND_PLAY";
354
+ case enums::MEDIA_PLAYER_COMMAND_PAUSE:
355
+ return "MEDIA_PLAYER_COMMAND_PAUSE";
356
+ case enums::MEDIA_PLAYER_COMMAND_STOP:
357
+ return "MEDIA_PLAYER_COMMAND_STOP";
358
+ case enums::MEDIA_PLAYER_COMMAND_MUTE:
359
+ return "MEDIA_PLAYER_COMMAND_MUTE";
360
+ case enums::MEDIA_PLAYER_COMMAND_UNMUTE:
361
+ return "MEDIA_PLAYER_COMMAND_UNMUTE";
362
+ default:
363
+ return "UNKNOWN";
364
+ }
365
+ }
366
+ template<> const char *proto_enum_to_string<enums::MediaPlayerFormatPurpose>(enums::MediaPlayerFormatPurpose value) {
367
+ switch (value) {
368
+ case enums::MEDIA_PLAYER_FORMAT_PURPOSE_DEFAULT:
369
+ return "MEDIA_PLAYER_FORMAT_PURPOSE_DEFAULT";
370
+ case enums::MEDIA_PLAYER_FORMAT_PURPOSE_ANNOUNCEMENT:
371
+ return "MEDIA_PLAYER_FORMAT_PURPOSE_ANNOUNCEMENT";
372
+ default:
373
+ return "UNKNOWN";
374
+ }
375
+ }
376
+ #endif
377
+ #ifdef USE_BLUETOOTH_PROXY
378
+ template<>
379
+ const char *proto_enum_to_string<enums::BluetoothDeviceRequestType>(enums::BluetoothDeviceRequestType value) {
380
+ switch (value) {
381
+ case enums::BLUETOOTH_DEVICE_REQUEST_TYPE_CONNECT:
382
+ return "BLUETOOTH_DEVICE_REQUEST_TYPE_CONNECT";
383
+ case enums::BLUETOOTH_DEVICE_REQUEST_TYPE_DISCONNECT:
384
+ return "BLUETOOTH_DEVICE_REQUEST_TYPE_DISCONNECT";
385
+ case enums::BLUETOOTH_DEVICE_REQUEST_TYPE_PAIR:
386
+ return "BLUETOOTH_DEVICE_REQUEST_TYPE_PAIR";
387
+ case enums::BLUETOOTH_DEVICE_REQUEST_TYPE_UNPAIR:
388
+ return "BLUETOOTH_DEVICE_REQUEST_TYPE_UNPAIR";
389
+ case enums::BLUETOOTH_DEVICE_REQUEST_TYPE_CONNECT_V3_WITH_CACHE:
390
+ return "BLUETOOTH_DEVICE_REQUEST_TYPE_CONNECT_V3_WITH_CACHE";
391
+ case enums::BLUETOOTH_DEVICE_REQUEST_TYPE_CONNECT_V3_WITHOUT_CACHE:
392
+ return "BLUETOOTH_DEVICE_REQUEST_TYPE_CONNECT_V3_WITHOUT_CACHE";
393
+ case enums::BLUETOOTH_DEVICE_REQUEST_TYPE_CLEAR_CACHE:
394
+ return "BLUETOOTH_DEVICE_REQUEST_TYPE_CLEAR_CACHE";
395
+ default:
396
+ return "UNKNOWN";
397
+ }
398
+ }
399
+ template<> const char *proto_enum_to_string<enums::BluetoothScannerState>(enums::BluetoothScannerState value) {
400
+ switch (value) {
401
+ case enums::BLUETOOTH_SCANNER_STATE_IDLE:
402
+ return "BLUETOOTH_SCANNER_STATE_IDLE";
403
+ case enums::BLUETOOTH_SCANNER_STATE_STARTING:
404
+ return "BLUETOOTH_SCANNER_STATE_STARTING";
405
+ case enums::BLUETOOTH_SCANNER_STATE_RUNNING:
406
+ return "BLUETOOTH_SCANNER_STATE_RUNNING";
407
+ case enums::BLUETOOTH_SCANNER_STATE_FAILED:
408
+ return "BLUETOOTH_SCANNER_STATE_FAILED";
409
+ case enums::BLUETOOTH_SCANNER_STATE_STOPPING:
410
+ return "BLUETOOTH_SCANNER_STATE_STOPPING";
411
+ case enums::BLUETOOTH_SCANNER_STATE_STOPPED:
412
+ return "BLUETOOTH_SCANNER_STATE_STOPPED";
413
+ default:
414
+ return "UNKNOWN";
415
+ }
416
+ }
417
+ template<> const char *proto_enum_to_string<enums::BluetoothScannerMode>(enums::BluetoothScannerMode value) {
418
+ switch (value) {
419
+ case enums::BLUETOOTH_SCANNER_MODE_PASSIVE:
420
+ return "BLUETOOTH_SCANNER_MODE_PASSIVE";
421
+ case enums::BLUETOOTH_SCANNER_MODE_ACTIVE:
422
+ return "BLUETOOTH_SCANNER_MODE_ACTIVE";
423
+ default:
424
+ return "UNKNOWN";
425
+ }
426
+ }
427
+ #endif
428
+ template<>
429
+ const char *proto_enum_to_string<enums::VoiceAssistantSubscribeFlag>(enums::VoiceAssistantSubscribeFlag value) {
430
+ switch (value) {
431
+ case enums::VOICE_ASSISTANT_SUBSCRIBE_NONE:
432
+ return "VOICE_ASSISTANT_SUBSCRIBE_NONE";
433
+ case enums::VOICE_ASSISTANT_SUBSCRIBE_API_AUDIO:
434
+ return "VOICE_ASSISTANT_SUBSCRIBE_API_AUDIO";
435
+ default:
436
+ return "UNKNOWN";
437
+ }
438
+ }
439
+ template<> const char *proto_enum_to_string<enums::VoiceAssistantRequestFlag>(enums::VoiceAssistantRequestFlag value) {
440
+ switch (value) {
441
+ case enums::VOICE_ASSISTANT_REQUEST_NONE:
442
+ return "VOICE_ASSISTANT_REQUEST_NONE";
443
+ case enums::VOICE_ASSISTANT_REQUEST_USE_VAD:
444
+ return "VOICE_ASSISTANT_REQUEST_USE_VAD";
445
+ case enums::VOICE_ASSISTANT_REQUEST_USE_WAKE_WORD:
446
+ return "VOICE_ASSISTANT_REQUEST_USE_WAKE_WORD";
447
+ default:
448
+ return "UNKNOWN";
449
+ }
450
+ }
451
+ #ifdef USE_VOICE_ASSISTANT
452
+ template<> const char *proto_enum_to_string<enums::VoiceAssistantEvent>(enums::VoiceAssistantEvent value) {
453
+ switch (value) {
454
+ case enums::VOICE_ASSISTANT_ERROR:
455
+ return "VOICE_ASSISTANT_ERROR";
456
+ case enums::VOICE_ASSISTANT_RUN_START:
457
+ return "VOICE_ASSISTANT_RUN_START";
458
+ case enums::VOICE_ASSISTANT_RUN_END:
459
+ return "VOICE_ASSISTANT_RUN_END";
460
+ case enums::VOICE_ASSISTANT_STT_START:
461
+ return "VOICE_ASSISTANT_STT_START";
462
+ case enums::VOICE_ASSISTANT_STT_END:
463
+ return "VOICE_ASSISTANT_STT_END";
464
+ case enums::VOICE_ASSISTANT_INTENT_START:
465
+ return "VOICE_ASSISTANT_INTENT_START";
466
+ case enums::VOICE_ASSISTANT_INTENT_END:
467
+ return "VOICE_ASSISTANT_INTENT_END";
468
+ case enums::VOICE_ASSISTANT_TTS_START:
469
+ return "VOICE_ASSISTANT_TTS_START";
470
+ case enums::VOICE_ASSISTANT_TTS_END:
471
+ return "VOICE_ASSISTANT_TTS_END";
472
+ case enums::VOICE_ASSISTANT_WAKE_WORD_START:
473
+ return "VOICE_ASSISTANT_WAKE_WORD_START";
474
+ case enums::VOICE_ASSISTANT_WAKE_WORD_END:
475
+ return "VOICE_ASSISTANT_WAKE_WORD_END";
476
+ case enums::VOICE_ASSISTANT_STT_VAD_START:
477
+ return "VOICE_ASSISTANT_STT_VAD_START";
478
+ case enums::VOICE_ASSISTANT_STT_VAD_END:
479
+ return "VOICE_ASSISTANT_STT_VAD_END";
480
+ case enums::VOICE_ASSISTANT_TTS_STREAM_START:
481
+ return "VOICE_ASSISTANT_TTS_STREAM_START";
482
+ case enums::VOICE_ASSISTANT_TTS_STREAM_END:
483
+ return "VOICE_ASSISTANT_TTS_STREAM_END";
484
+ case enums::VOICE_ASSISTANT_INTENT_PROGRESS:
485
+ return "VOICE_ASSISTANT_INTENT_PROGRESS";
486
+ default:
487
+ return "UNKNOWN";
488
+ }
489
+ }
490
+ template<> const char *proto_enum_to_string<enums::VoiceAssistantTimerEvent>(enums::VoiceAssistantTimerEvent value) {
491
+ switch (value) {
492
+ case enums::VOICE_ASSISTANT_TIMER_STARTED:
493
+ return "VOICE_ASSISTANT_TIMER_STARTED";
494
+ case enums::VOICE_ASSISTANT_TIMER_UPDATED:
495
+ return "VOICE_ASSISTANT_TIMER_UPDATED";
496
+ case enums::VOICE_ASSISTANT_TIMER_CANCELLED:
497
+ return "VOICE_ASSISTANT_TIMER_CANCELLED";
498
+ case enums::VOICE_ASSISTANT_TIMER_FINISHED:
499
+ return "VOICE_ASSISTANT_TIMER_FINISHED";
500
+ default:
501
+ return "UNKNOWN";
502
+ }
503
+ }
504
+ #endif
505
+ #ifdef USE_ALARM_CONTROL_PANEL
506
+ template<> const char *proto_enum_to_string<enums::AlarmControlPanelState>(enums::AlarmControlPanelState value) {
507
+ switch (value) {
508
+ case enums::ALARM_STATE_DISARMED:
509
+ return "ALARM_STATE_DISARMED";
510
+ case enums::ALARM_STATE_ARMED_HOME:
511
+ return "ALARM_STATE_ARMED_HOME";
512
+ case enums::ALARM_STATE_ARMED_AWAY:
513
+ return "ALARM_STATE_ARMED_AWAY";
514
+ case enums::ALARM_STATE_ARMED_NIGHT:
515
+ return "ALARM_STATE_ARMED_NIGHT";
516
+ case enums::ALARM_STATE_ARMED_VACATION:
517
+ return "ALARM_STATE_ARMED_VACATION";
518
+ case enums::ALARM_STATE_ARMED_CUSTOM_BYPASS:
519
+ return "ALARM_STATE_ARMED_CUSTOM_BYPASS";
520
+ case enums::ALARM_STATE_PENDING:
521
+ return "ALARM_STATE_PENDING";
522
+ case enums::ALARM_STATE_ARMING:
523
+ return "ALARM_STATE_ARMING";
524
+ case enums::ALARM_STATE_DISARMING:
525
+ return "ALARM_STATE_DISARMING";
526
+ case enums::ALARM_STATE_TRIGGERED:
527
+ return "ALARM_STATE_TRIGGERED";
528
+ default:
529
+ return "UNKNOWN";
530
+ }
531
+ }
532
+ template<>
533
+ const char *proto_enum_to_string<enums::AlarmControlPanelStateCommand>(enums::AlarmControlPanelStateCommand value) {
534
+ switch (value) {
535
+ case enums::ALARM_CONTROL_PANEL_DISARM:
536
+ return "ALARM_CONTROL_PANEL_DISARM";
537
+ case enums::ALARM_CONTROL_PANEL_ARM_AWAY:
538
+ return "ALARM_CONTROL_PANEL_ARM_AWAY";
539
+ case enums::ALARM_CONTROL_PANEL_ARM_HOME:
540
+ return "ALARM_CONTROL_PANEL_ARM_HOME";
541
+ case enums::ALARM_CONTROL_PANEL_ARM_NIGHT:
542
+ return "ALARM_CONTROL_PANEL_ARM_NIGHT";
543
+ case enums::ALARM_CONTROL_PANEL_ARM_VACATION:
544
+ return "ALARM_CONTROL_PANEL_ARM_VACATION";
545
+ case enums::ALARM_CONTROL_PANEL_ARM_CUSTOM_BYPASS:
546
+ return "ALARM_CONTROL_PANEL_ARM_CUSTOM_BYPASS";
547
+ case enums::ALARM_CONTROL_PANEL_TRIGGER:
548
+ return "ALARM_CONTROL_PANEL_TRIGGER";
549
+ default:
550
+ return "UNKNOWN";
551
+ }
552
+ }
553
+ #endif
554
+ #ifdef USE_TEXT
555
+ template<> const char *proto_enum_to_string<enums::TextMode>(enums::TextMode value) {
556
+ switch (value) {
557
+ case enums::TEXT_MODE_TEXT:
558
+ return "TEXT_MODE_TEXT";
559
+ case enums::TEXT_MODE_PASSWORD:
560
+ return "TEXT_MODE_PASSWORD";
561
+ default:
562
+ return "UNKNOWN";
563
+ }
564
+ }
565
+ #endif
566
+ #ifdef USE_VALVE
567
+ template<> const char *proto_enum_to_string<enums::ValveOperation>(enums::ValveOperation value) {
568
+ switch (value) {
569
+ case enums::VALVE_OPERATION_IDLE:
570
+ return "VALVE_OPERATION_IDLE";
571
+ case enums::VALVE_OPERATION_IS_OPENING:
572
+ return "VALVE_OPERATION_IS_OPENING";
573
+ case enums::VALVE_OPERATION_IS_CLOSING:
574
+ return "VALVE_OPERATION_IS_CLOSING";
575
+ default:
576
+ return "UNKNOWN";
577
+ }
578
+ }
579
+ #endif
580
+ #ifdef USE_UPDATE
581
+ template<> const char *proto_enum_to_string<enums::UpdateCommand>(enums::UpdateCommand value) {
582
+ switch (value) {
583
+ case enums::UPDATE_COMMAND_NONE:
584
+ return "UPDATE_COMMAND_NONE";
585
+ case enums::UPDATE_COMMAND_UPDATE:
586
+ return "UPDATE_COMMAND_UPDATE";
587
+ case enums::UPDATE_COMMAND_CHECK:
588
+ return "UPDATE_COMMAND_CHECK";
589
+ default:
590
+ return "UNKNOWN";
591
+ }
592
+ }
593
+ #endif
594
+
595
+ void HelloRequest::dump_to(std::string &out) const {
596
+ __attribute__((unused)) char buffer[64];
597
+ out.append("HelloRequest {\n");
598
+ out.append(" client_info: ");
599
+ out.append("'").append(this->client_info).append("'");
600
+ out.append("\n");
601
+
602
+ out.append(" api_version_major: ");
603
+ snprintf(buffer, sizeof(buffer), "%" PRIu32, this->api_version_major);
604
+ out.append(buffer);
605
+ out.append("\n");
606
+
607
+ out.append(" api_version_minor: ");
608
+ snprintf(buffer, sizeof(buffer), "%" PRIu32, this->api_version_minor);
609
+ out.append(buffer);
610
+ out.append("\n");
611
+ out.append("}");
612
+ }
613
+ void HelloResponse::dump_to(std::string &out) const {
614
+ __attribute__((unused)) char buffer[64];
615
+ out.append("HelloResponse {\n");
616
+ out.append(" api_version_major: ");
617
+ snprintf(buffer, sizeof(buffer), "%" PRIu32, this->api_version_major);
618
+ out.append(buffer);
619
+ out.append("\n");
620
+
621
+ out.append(" api_version_minor: ");
622
+ snprintf(buffer, sizeof(buffer), "%" PRIu32, this->api_version_minor);
623
+ out.append(buffer);
624
+ out.append("\n");
625
+
626
+ out.append(" server_info: ");
627
+ out.append("'").append(this->server_info).append("'");
628
+ out.append("\n");
629
+
630
+ out.append(" name: ");
631
+ out.append("'").append(this->name).append("'");
632
+ out.append("\n");
633
+ out.append("}");
634
+ }
635
+ void ConnectRequest::dump_to(std::string &out) const {
636
+ __attribute__((unused)) char buffer[64];
637
+ out.append("ConnectRequest {\n");
638
+ out.append(" password: ");
639
+ out.append("'").append(this->password).append("'");
640
+ out.append("\n");
641
+ out.append("}");
642
+ }
643
+ void ConnectResponse::dump_to(std::string &out) const {
644
+ __attribute__((unused)) char buffer[64];
645
+ out.append("ConnectResponse {\n");
646
+ out.append(" invalid_password: ");
647
+ out.append(YESNO(this->invalid_password));
648
+ out.append("\n");
649
+ out.append("}");
650
+ }
651
+ void DisconnectRequest::dump_to(std::string &out) const { out.append("DisconnectRequest {}"); }
652
+ void DisconnectResponse::dump_to(std::string &out) const { out.append("DisconnectResponse {}"); }
653
+ void PingRequest::dump_to(std::string &out) const { out.append("PingRequest {}"); }
654
+ void PingResponse::dump_to(std::string &out) const { out.append("PingResponse {}"); }
655
+ void DeviceInfoRequest::dump_to(std::string &out) const { out.append("DeviceInfoRequest {}"); }
656
+ void AreaInfo::dump_to(std::string &out) const {
657
+ __attribute__((unused)) char buffer[64];
658
+ out.append("AreaInfo {\n");
659
+ out.append(" area_id: ");
660
+ snprintf(buffer, sizeof(buffer), "%" PRIu32, this->area_id);
661
+ out.append(buffer);
662
+ out.append("\n");
663
+
664
+ out.append(" name: ");
665
+ out.append("'").append(this->name).append("'");
666
+ out.append("\n");
667
+ out.append("}");
668
+ }
669
+ void DeviceInfo::dump_to(std::string &out) const {
670
+ __attribute__((unused)) char buffer[64];
671
+ out.append("DeviceInfo {\n");
672
+ out.append(" device_id: ");
673
+ snprintf(buffer, sizeof(buffer), "%" PRIu32, this->device_id);
674
+ out.append(buffer);
675
+ out.append("\n");
676
+
677
+ out.append(" name: ");
678
+ out.append("'").append(this->name).append("'");
679
+ out.append("\n");
680
+
681
+ out.append(" area_id: ");
682
+ snprintf(buffer, sizeof(buffer), "%" PRIu32, this->area_id);
683
+ out.append(buffer);
684
+ out.append("\n");
685
+ out.append("}");
686
+ }
687
+ void DeviceInfoResponse::dump_to(std::string &out) const {
688
+ __attribute__((unused)) char buffer[64];
689
+ out.append("DeviceInfoResponse {\n");
690
+ out.append(" uses_password: ");
691
+ out.append(YESNO(this->uses_password));
692
+ out.append("\n");
693
+
694
+ out.append(" name: ");
695
+ out.append("'").append(this->name).append("'");
696
+ out.append("\n");
697
+
698
+ out.append(" mac_address: ");
699
+ out.append("'").append(this->mac_address).append("'");
700
+ out.append("\n");
701
+
702
+ out.append(" esphome_version: ");
703
+ out.append("'").append(this->esphome_version).append("'");
704
+ out.append("\n");
705
+
706
+ out.append(" compilation_time: ");
707
+ out.append("'").append(this->compilation_time).append("'");
708
+ out.append("\n");
709
+
710
+ out.append(" model: ");
711
+ out.append("'").append(this->model).append("'");
712
+ out.append("\n");
713
+
714
+ out.append(" has_deep_sleep: ");
715
+ out.append(YESNO(this->has_deep_sleep));
716
+ out.append("\n");
717
+
718
+ out.append(" project_name: ");
719
+ out.append("'").append(this->project_name).append("'");
720
+ out.append("\n");
721
+
722
+ out.append(" project_version: ");
723
+ out.append("'").append(this->project_version).append("'");
724
+ out.append("\n");
725
+
726
+ out.append(" webserver_port: ");
727
+ snprintf(buffer, sizeof(buffer), "%" PRIu32, this->webserver_port);
728
+ out.append(buffer);
729
+ out.append("\n");
730
+
731
+ out.append(" legacy_bluetooth_proxy_version: ");
732
+ snprintf(buffer, sizeof(buffer), "%" PRIu32, this->legacy_bluetooth_proxy_version);
733
+ out.append(buffer);
734
+ out.append("\n");
735
+
736
+ out.append(" bluetooth_proxy_feature_flags: ");
737
+ snprintf(buffer, sizeof(buffer), "%" PRIu32, this->bluetooth_proxy_feature_flags);
738
+ out.append(buffer);
739
+ out.append("\n");
740
+
741
+ out.append(" manufacturer: ");
742
+ out.append("'").append(this->manufacturer).append("'");
743
+ out.append("\n");
744
+
745
+ out.append(" friendly_name: ");
746
+ out.append("'").append(this->friendly_name).append("'");
747
+ out.append("\n");
748
+
749
+ out.append(" legacy_voice_assistant_version: ");
750
+ snprintf(buffer, sizeof(buffer), "%" PRIu32, this->legacy_voice_assistant_version);
751
+ out.append(buffer);
752
+ out.append("\n");
753
+
754
+ out.append(" voice_assistant_feature_flags: ");
755
+ snprintf(buffer, sizeof(buffer), "%" PRIu32, this->voice_assistant_feature_flags);
756
+ out.append(buffer);
757
+ out.append("\n");
758
+
759
+ out.append(" suggested_area: ");
760
+ out.append("'").append(this->suggested_area).append("'");
761
+ out.append("\n");
762
+
763
+ out.append(" bluetooth_mac_address: ");
764
+ out.append("'").append(this->bluetooth_mac_address).append("'");
765
+ out.append("\n");
766
+
767
+ out.append(" api_encryption_supported: ");
768
+ out.append(YESNO(this->api_encryption_supported));
769
+ out.append("\n");
770
+
771
+ for (const auto &it : this->devices) {
772
+ out.append(" devices: ");
773
+ it.dump_to(out);
774
+ out.append("\n");
775
+ }
776
+
777
+ for (const auto &it : this->areas) {
778
+ out.append(" areas: ");
779
+ it.dump_to(out);
780
+ out.append("\n");
781
+ }
782
+
783
+ out.append(" area: ");
784
+ this->area.dump_to(out);
785
+ out.append("\n");
786
+ out.append("}");
787
+ }
788
+ void ListEntitiesRequest::dump_to(std::string &out) const { out.append("ListEntitiesRequest {}"); }
789
+ void ListEntitiesDoneResponse::dump_to(std::string &out) const { out.append("ListEntitiesDoneResponse {}"); }
790
+ void SubscribeStatesRequest::dump_to(std::string &out) const { out.append("SubscribeStatesRequest {}"); }
791
+ #ifdef USE_BINARY_SENSOR
792
+ void ListEntitiesBinarySensorResponse::dump_to(std::string &out) const {
793
+ __attribute__((unused)) char buffer[64];
794
+ out.append("ListEntitiesBinarySensorResponse {\n");
795
+ out.append(" object_id: ");
796
+ out.append("'").append(this->object_id).append("'");
797
+ out.append("\n");
798
+
799
+ out.append(" key: ");
800
+ snprintf(buffer, sizeof(buffer), "%" PRIu32, this->key);
801
+ out.append(buffer);
802
+ out.append("\n");
803
+
804
+ out.append(" name: ");
805
+ out.append("'").append(this->name).append("'");
806
+ out.append("\n");
807
+
808
+ out.append(" unique_id: ");
809
+ out.append("'").append(this->unique_id).append("'");
810
+ out.append("\n");
811
+
812
+ out.append(" device_class: ");
813
+ out.append("'").append(this->device_class).append("'");
814
+ out.append("\n");
815
+
816
+ out.append(" is_status_binary_sensor: ");
817
+ out.append(YESNO(this->is_status_binary_sensor));
818
+ out.append("\n");
819
+
820
+ out.append(" disabled_by_default: ");
821
+ out.append(YESNO(this->disabled_by_default));
822
+ out.append("\n");
823
+
824
+ out.append(" icon: ");
825
+ out.append("'").append(this->icon).append("'");
826
+ out.append("\n");
827
+
828
+ out.append(" entity_category: ");
829
+ out.append(proto_enum_to_string<enums::EntityCategory>(this->entity_category));
830
+ out.append("\n");
831
+
832
+ out.append(" device_id: ");
833
+ snprintf(buffer, sizeof(buffer), "%" PRIu32, this->device_id);
834
+ out.append(buffer);
835
+ out.append("\n");
836
+ out.append("}");
837
+ }
838
+ void BinarySensorStateResponse::dump_to(std::string &out) const {
839
+ __attribute__((unused)) char buffer[64];
840
+ out.append("BinarySensorStateResponse {\n");
841
+ out.append(" key: ");
842
+ snprintf(buffer, sizeof(buffer), "%" PRIu32, this->key);
843
+ out.append(buffer);
844
+ out.append("\n");
845
+
846
+ out.append(" state: ");
847
+ out.append(YESNO(this->state));
848
+ out.append("\n");
849
+
850
+ out.append(" missing_state: ");
851
+ out.append(YESNO(this->missing_state));
852
+ out.append("\n");
853
+
854
+ out.append(" device_id: ");
855
+ snprintf(buffer, sizeof(buffer), "%" PRIu32, this->device_id);
856
+ out.append(buffer);
857
+ out.append("\n");
858
+ out.append("}");
859
+ }
860
+ #endif
861
+ #ifdef USE_COVER
862
+ void ListEntitiesCoverResponse::dump_to(std::string &out) const {
863
+ __attribute__((unused)) char buffer[64];
864
+ out.append("ListEntitiesCoverResponse {\n");
865
+ out.append(" object_id: ");
866
+ out.append("'").append(this->object_id).append("'");
867
+ out.append("\n");
868
+
869
+ out.append(" key: ");
870
+ snprintf(buffer, sizeof(buffer), "%" PRIu32, this->key);
871
+ out.append(buffer);
872
+ out.append("\n");
873
+
874
+ out.append(" name: ");
875
+ out.append("'").append(this->name).append("'");
876
+ out.append("\n");
877
+
878
+ out.append(" unique_id: ");
879
+ out.append("'").append(this->unique_id).append("'");
880
+ out.append("\n");
881
+
882
+ out.append(" assumed_state: ");
883
+ out.append(YESNO(this->assumed_state));
884
+ out.append("\n");
885
+
886
+ out.append(" supports_position: ");
887
+ out.append(YESNO(this->supports_position));
888
+ out.append("\n");
889
+
890
+ out.append(" supports_tilt: ");
891
+ out.append(YESNO(this->supports_tilt));
892
+ out.append("\n");
893
+
894
+ out.append(" device_class: ");
895
+ out.append("'").append(this->device_class).append("'");
896
+ out.append("\n");
897
+
898
+ out.append(" disabled_by_default: ");
899
+ out.append(YESNO(this->disabled_by_default));
900
+ out.append("\n");
901
+
902
+ out.append(" icon: ");
903
+ out.append("'").append(this->icon).append("'");
904
+ out.append("\n");
905
+
906
+ out.append(" entity_category: ");
907
+ out.append(proto_enum_to_string<enums::EntityCategory>(this->entity_category));
908
+ out.append("\n");
909
+
910
+ out.append(" supports_stop: ");
911
+ out.append(YESNO(this->supports_stop));
912
+ out.append("\n");
913
+
914
+ out.append(" device_id: ");
915
+ snprintf(buffer, sizeof(buffer), "%" PRIu32, this->device_id);
916
+ out.append(buffer);
917
+ out.append("\n");
918
+ out.append("}");
919
+ }
920
+ void CoverStateResponse::dump_to(std::string &out) const {
921
+ __attribute__((unused)) char buffer[64];
922
+ out.append("CoverStateResponse {\n");
923
+ out.append(" key: ");
924
+ snprintf(buffer, sizeof(buffer), "%" PRIu32, this->key);
925
+ out.append(buffer);
926
+ out.append("\n");
927
+
928
+ out.append(" legacy_state: ");
929
+ out.append(proto_enum_to_string<enums::LegacyCoverState>(this->legacy_state));
930
+ out.append("\n");
931
+
932
+ out.append(" position: ");
933
+ snprintf(buffer, sizeof(buffer), "%g", this->position);
934
+ out.append(buffer);
935
+ out.append("\n");
936
+
937
+ out.append(" tilt: ");
938
+ snprintf(buffer, sizeof(buffer), "%g", this->tilt);
939
+ out.append(buffer);
940
+ out.append("\n");
941
+
942
+ out.append(" current_operation: ");
943
+ out.append(proto_enum_to_string<enums::CoverOperation>(this->current_operation));
944
+ out.append("\n");
945
+
946
+ out.append(" device_id: ");
947
+ snprintf(buffer, sizeof(buffer), "%" PRIu32, this->device_id);
948
+ out.append(buffer);
949
+ out.append("\n");
950
+ out.append("}");
951
+ }
952
+ void CoverCommandRequest::dump_to(std::string &out) const {
953
+ __attribute__((unused)) char buffer[64];
954
+ out.append("CoverCommandRequest {\n");
955
+ out.append(" key: ");
956
+ snprintf(buffer, sizeof(buffer), "%" PRIu32, this->key);
957
+ out.append(buffer);
958
+ out.append("\n");
959
+
960
+ out.append(" has_legacy_command: ");
961
+ out.append(YESNO(this->has_legacy_command));
962
+ out.append("\n");
963
+
964
+ out.append(" legacy_command: ");
965
+ out.append(proto_enum_to_string<enums::LegacyCoverCommand>(this->legacy_command));
966
+ out.append("\n");
967
+
968
+ out.append(" has_position: ");
969
+ out.append(YESNO(this->has_position));
970
+ out.append("\n");
971
+
972
+ out.append(" position: ");
973
+ snprintf(buffer, sizeof(buffer), "%g", this->position);
974
+ out.append(buffer);
975
+ out.append("\n");
976
+
977
+ out.append(" has_tilt: ");
978
+ out.append(YESNO(this->has_tilt));
979
+ out.append("\n");
980
+
981
+ out.append(" tilt: ");
982
+ snprintf(buffer, sizeof(buffer), "%g", this->tilt);
983
+ out.append(buffer);
984
+ out.append("\n");
985
+
986
+ out.append(" stop: ");
987
+ out.append(YESNO(this->stop));
988
+ out.append("\n");
989
+ out.append("}");
990
+ }
991
+ #endif
992
+ #ifdef USE_FAN
993
+ void ListEntitiesFanResponse::dump_to(std::string &out) const {
994
+ __attribute__((unused)) char buffer[64];
995
+ out.append("ListEntitiesFanResponse {\n");
996
+ out.append(" object_id: ");
997
+ out.append("'").append(this->object_id).append("'");
998
+ out.append("\n");
999
+
1000
+ out.append(" key: ");
1001
+ snprintf(buffer, sizeof(buffer), "%" PRIu32, this->key);
1002
+ out.append(buffer);
1003
+ out.append("\n");
1004
+
1005
+ out.append(" name: ");
1006
+ out.append("'").append(this->name).append("'");
1007
+ out.append("\n");
1008
+
1009
+ out.append(" unique_id: ");
1010
+ out.append("'").append(this->unique_id).append("'");
1011
+ out.append("\n");
1012
+
1013
+ out.append(" supports_oscillation: ");
1014
+ out.append(YESNO(this->supports_oscillation));
1015
+ out.append("\n");
1016
+
1017
+ out.append(" supports_speed: ");
1018
+ out.append(YESNO(this->supports_speed));
1019
+ out.append("\n");
1020
+
1021
+ out.append(" supports_direction: ");
1022
+ out.append(YESNO(this->supports_direction));
1023
+ out.append("\n");
1024
+
1025
+ out.append(" supported_speed_count: ");
1026
+ snprintf(buffer, sizeof(buffer), "%" PRId32, this->supported_speed_count);
1027
+ out.append(buffer);
1028
+ out.append("\n");
1029
+
1030
+ out.append(" disabled_by_default: ");
1031
+ out.append(YESNO(this->disabled_by_default));
1032
+ out.append("\n");
1033
+
1034
+ out.append(" icon: ");
1035
+ out.append("'").append(this->icon).append("'");
1036
+ out.append("\n");
1037
+
1038
+ out.append(" entity_category: ");
1039
+ out.append(proto_enum_to_string<enums::EntityCategory>(this->entity_category));
1040
+ out.append("\n");
1041
+
1042
+ for (const auto &it : this->supported_preset_modes) {
1043
+ out.append(" supported_preset_modes: ");
1044
+ out.append("'").append(it).append("'");
1045
+ out.append("\n");
1046
+ }
1047
+
1048
+ out.append(" device_id: ");
1049
+ snprintf(buffer, sizeof(buffer), "%" PRIu32, this->device_id);
1050
+ out.append(buffer);
1051
+ out.append("\n");
1052
+ out.append("}");
1053
+ }
1054
+ void FanStateResponse::dump_to(std::string &out) const {
1055
+ __attribute__((unused)) char buffer[64];
1056
+ out.append("FanStateResponse {\n");
1057
+ out.append(" key: ");
1058
+ snprintf(buffer, sizeof(buffer), "%" PRIu32, this->key);
1059
+ out.append(buffer);
1060
+ out.append("\n");
1061
+
1062
+ out.append(" state: ");
1063
+ out.append(YESNO(this->state));
1064
+ out.append("\n");
1065
+
1066
+ out.append(" oscillating: ");
1067
+ out.append(YESNO(this->oscillating));
1068
+ out.append("\n");
1069
+
1070
+ out.append(" speed: ");
1071
+ out.append(proto_enum_to_string<enums::FanSpeed>(this->speed));
1072
+ out.append("\n");
1073
+
1074
+ out.append(" direction: ");
1075
+ out.append(proto_enum_to_string<enums::FanDirection>(this->direction));
1076
+ out.append("\n");
1077
+
1078
+ out.append(" speed_level: ");
1079
+ snprintf(buffer, sizeof(buffer), "%" PRId32, this->speed_level);
1080
+ out.append(buffer);
1081
+ out.append("\n");
1082
+
1083
+ out.append(" preset_mode: ");
1084
+ out.append("'").append(this->preset_mode).append("'");
1085
+ out.append("\n");
1086
+
1087
+ out.append(" device_id: ");
1088
+ snprintf(buffer, sizeof(buffer), "%" PRIu32, this->device_id);
1089
+ out.append(buffer);
1090
+ out.append("\n");
1091
+ out.append("}");
1092
+ }
1093
+ void FanCommandRequest::dump_to(std::string &out) const {
1094
+ __attribute__((unused)) char buffer[64];
1095
+ out.append("FanCommandRequest {\n");
1096
+ out.append(" key: ");
1097
+ snprintf(buffer, sizeof(buffer), "%" PRIu32, this->key);
1098
+ out.append(buffer);
1099
+ out.append("\n");
1100
+
1101
+ out.append(" has_state: ");
1102
+ out.append(YESNO(this->has_state));
1103
+ out.append("\n");
1104
+
1105
+ out.append(" state: ");
1106
+ out.append(YESNO(this->state));
1107
+ out.append("\n");
1108
+
1109
+ out.append(" has_speed: ");
1110
+ out.append(YESNO(this->has_speed));
1111
+ out.append("\n");
1112
+
1113
+ out.append(" speed: ");
1114
+ out.append(proto_enum_to_string<enums::FanSpeed>(this->speed));
1115
+ out.append("\n");
1116
+
1117
+ out.append(" has_oscillating: ");
1118
+ out.append(YESNO(this->has_oscillating));
1119
+ out.append("\n");
1120
+
1121
+ out.append(" oscillating: ");
1122
+ out.append(YESNO(this->oscillating));
1123
+ out.append("\n");
1124
+
1125
+ out.append(" has_direction: ");
1126
+ out.append(YESNO(this->has_direction));
1127
+ out.append("\n");
1128
+
1129
+ out.append(" direction: ");
1130
+ out.append(proto_enum_to_string<enums::FanDirection>(this->direction));
1131
+ out.append("\n");
1132
+
1133
+ out.append(" has_speed_level: ");
1134
+ out.append(YESNO(this->has_speed_level));
1135
+ out.append("\n");
1136
+
1137
+ out.append(" speed_level: ");
1138
+ snprintf(buffer, sizeof(buffer), "%" PRId32, this->speed_level);
1139
+ out.append(buffer);
1140
+ out.append("\n");
1141
+
1142
+ out.append(" has_preset_mode: ");
1143
+ out.append(YESNO(this->has_preset_mode));
1144
+ out.append("\n");
1145
+
1146
+ out.append(" preset_mode: ");
1147
+ out.append("'").append(this->preset_mode).append("'");
1148
+ out.append("\n");
1149
+ out.append("}");
1150
+ }
1151
+ #endif
1152
+ #ifdef USE_LIGHT
1153
+ void ListEntitiesLightResponse::dump_to(std::string &out) const {
1154
+ __attribute__((unused)) char buffer[64];
1155
+ out.append("ListEntitiesLightResponse {\n");
1156
+ out.append(" object_id: ");
1157
+ out.append("'").append(this->object_id).append("'");
1158
+ out.append("\n");
1159
+
1160
+ out.append(" key: ");
1161
+ snprintf(buffer, sizeof(buffer), "%" PRIu32, this->key);
1162
+ out.append(buffer);
1163
+ out.append("\n");
1164
+
1165
+ out.append(" name: ");
1166
+ out.append("'").append(this->name).append("'");
1167
+ out.append("\n");
1168
+
1169
+ out.append(" unique_id: ");
1170
+ out.append("'").append(this->unique_id).append("'");
1171
+ out.append("\n");
1172
+
1173
+ for (const auto &it : this->supported_color_modes) {
1174
+ out.append(" supported_color_modes: ");
1175
+ out.append(proto_enum_to_string<enums::ColorMode>(it));
1176
+ out.append("\n");
1177
+ }
1178
+
1179
+ out.append(" legacy_supports_brightness: ");
1180
+ out.append(YESNO(this->legacy_supports_brightness));
1181
+ out.append("\n");
1182
+
1183
+ out.append(" legacy_supports_rgb: ");
1184
+ out.append(YESNO(this->legacy_supports_rgb));
1185
+ out.append("\n");
1186
+
1187
+ out.append(" legacy_supports_white_value: ");
1188
+ out.append(YESNO(this->legacy_supports_white_value));
1189
+ out.append("\n");
1190
+
1191
+ out.append(" legacy_supports_color_temperature: ");
1192
+ out.append(YESNO(this->legacy_supports_color_temperature));
1193
+ out.append("\n");
1194
+
1195
+ out.append(" min_mireds: ");
1196
+ snprintf(buffer, sizeof(buffer), "%g", this->min_mireds);
1197
+ out.append(buffer);
1198
+ out.append("\n");
1199
+
1200
+ out.append(" max_mireds: ");
1201
+ snprintf(buffer, sizeof(buffer), "%g", this->max_mireds);
1202
+ out.append(buffer);
1203
+ out.append("\n");
1204
+
1205
+ for (const auto &it : this->effects) {
1206
+ out.append(" effects: ");
1207
+ out.append("'").append(it).append("'");
1208
+ out.append("\n");
1209
+ }
1210
+
1211
+ out.append(" disabled_by_default: ");
1212
+ out.append(YESNO(this->disabled_by_default));
1213
+ out.append("\n");
1214
+
1215
+ out.append(" icon: ");
1216
+ out.append("'").append(this->icon).append("'");
1217
+ out.append("\n");
1218
+
1219
+ out.append(" entity_category: ");
1220
+ out.append(proto_enum_to_string<enums::EntityCategory>(this->entity_category));
1221
+ out.append("\n");
1222
+
1223
+ out.append(" device_id: ");
1224
+ snprintf(buffer, sizeof(buffer), "%" PRIu32, this->device_id);
1225
+ out.append(buffer);
1226
+ out.append("\n");
1227
+ out.append("}");
1228
+ }
1229
+ void LightStateResponse::dump_to(std::string &out) const {
1230
+ __attribute__((unused)) char buffer[64];
1231
+ out.append("LightStateResponse {\n");
1232
+ out.append(" key: ");
1233
+ snprintf(buffer, sizeof(buffer), "%" PRIu32, this->key);
1234
+ out.append(buffer);
1235
+ out.append("\n");
1236
+
1237
+ out.append(" state: ");
1238
+ out.append(YESNO(this->state));
1239
+ out.append("\n");
1240
+
1241
+ out.append(" brightness: ");
1242
+ snprintf(buffer, sizeof(buffer), "%g", this->brightness);
1243
+ out.append(buffer);
1244
+ out.append("\n");
1245
+
1246
+ out.append(" color_mode: ");
1247
+ out.append(proto_enum_to_string<enums::ColorMode>(this->color_mode));
1248
+ out.append("\n");
1249
+
1250
+ out.append(" color_brightness: ");
1251
+ snprintf(buffer, sizeof(buffer), "%g", this->color_brightness);
1252
+ out.append(buffer);
1253
+ out.append("\n");
1254
+
1255
+ out.append(" red: ");
1256
+ snprintf(buffer, sizeof(buffer), "%g", this->red);
1257
+ out.append(buffer);
1258
+ out.append("\n");
1259
+
1260
+ out.append(" green: ");
1261
+ snprintf(buffer, sizeof(buffer), "%g", this->green);
1262
+ out.append(buffer);
1263
+ out.append("\n");
1264
+
1265
+ out.append(" blue: ");
1266
+ snprintf(buffer, sizeof(buffer), "%g", this->blue);
1267
+ out.append(buffer);
1268
+ out.append("\n");
1269
+
1270
+ out.append(" white: ");
1271
+ snprintf(buffer, sizeof(buffer), "%g", this->white);
1272
+ out.append(buffer);
1273
+ out.append("\n");
1274
+
1275
+ out.append(" color_temperature: ");
1276
+ snprintf(buffer, sizeof(buffer), "%g", this->color_temperature);
1277
+ out.append(buffer);
1278
+ out.append("\n");
1279
+
1280
+ out.append(" cold_white: ");
1281
+ snprintf(buffer, sizeof(buffer), "%g", this->cold_white);
1282
+ out.append(buffer);
1283
+ out.append("\n");
1284
+
1285
+ out.append(" warm_white: ");
1286
+ snprintf(buffer, sizeof(buffer), "%g", this->warm_white);
1287
+ out.append(buffer);
1288
+ out.append("\n");
1289
+
1290
+ out.append(" effect: ");
1291
+ out.append("'").append(this->effect).append("'");
1292
+ out.append("\n");
1293
+
1294
+ out.append(" device_id: ");
1295
+ snprintf(buffer, sizeof(buffer), "%" PRIu32, this->device_id);
1296
+ out.append(buffer);
1297
+ out.append("\n");
1298
+ out.append("}");
1299
+ }
1300
+ void LightCommandRequest::dump_to(std::string &out) const {
1301
+ __attribute__((unused)) char buffer[64];
1302
+ out.append("LightCommandRequest {\n");
1303
+ out.append(" key: ");
1304
+ snprintf(buffer, sizeof(buffer), "%" PRIu32, this->key);
1305
+ out.append(buffer);
1306
+ out.append("\n");
1307
+
1308
+ out.append(" has_state: ");
1309
+ out.append(YESNO(this->has_state));
1310
+ out.append("\n");
1311
+
1312
+ out.append(" state: ");
1313
+ out.append(YESNO(this->state));
1314
+ out.append("\n");
1315
+
1316
+ out.append(" has_brightness: ");
1317
+ out.append(YESNO(this->has_brightness));
1318
+ out.append("\n");
1319
+
1320
+ out.append(" brightness: ");
1321
+ snprintf(buffer, sizeof(buffer), "%g", this->brightness);
1322
+ out.append(buffer);
1323
+ out.append("\n");
1324
+
1325
+ out.append(" has_color_mode: ");
1326
+ out.append(YESNO(this->has_color_mode));
1327
+ out.append("\n");
1328
+
1329
+ out.append(" color_mode: ");
1330
+ out.append(proto_enum_to_string<enums::ColorMode>(this->color_mode));
1331
+ out.append("\n");
1332
+
1333
+ out.append(" has_color_brightness: ");
1334
+ out.append(YESNO(this->has_color_brightness));
1335
+ out.append("\n");
1336
+
1337
+ out.append(" color_brightness: ");
1338
+ snprintf(buffer, sizeof(buffer), "%g", this->color_brightness);
1339
+ out.append(buffer);
1340
+ out.append("\n");
1341
+
1342
+ out.append(" has_rgb: ");
1343
+ out.append(YESNO(this->has_rgb));
1344
+ out.append("\n");
1345
+
1346
+ out.append(" red: ");
1347
+ snprintf(buffer, sizeof(buffer), "%g", this->red);
1348
+ out.append(buffer);
1349
+ out.append("\n");
1350
+
1351
+ out.append(" green: ");
1352
+ snprintf(buffer, sizeof(buffer), "%g", this->green);
1353
+ out.append(buffer);
1354
+ out.append("\n");
1355
+
1356
+ out.append(" blue: ");
1357
+ snprintf(buffer, sizeof(buffer), "%g", this->blue);
1358
+ out.append(buffer);
1359
+ out.append("\n");
1360
+
1361
+ out.append(" has_white: ");
1362
+ out.append(YESNO(this->has_white));
1363
+ out.append("\n");
1364
+
1365
+ out.append(" white: ");
1366
+ snprintf(buffer, sizeof(buffer), "%g", this->white);
1367
+ out.append(buffer);
1368
+ out.append("\n");
1369
+
1370
+ out.append(" has_color_temperature: ");
1371
+ out.append(YESNO(this->has_color_temperature));
1372
+ out.append("\n");
1373
+
1374
+ out.append(" color_temperature: ");
1375
+ snprintf(buffer, sizeof(buffer), "%g", this->color_temperature);
1376
+ out.append(buffer);
1377
+ out.append("\n");
1378
+
1379
+ out.append(" has_cold_white: ");
1380
+ out.append(YESNO(this->has_cold_white));
1381
+ out.append("\n");
1382
+
1383
+ out.append(" cold_white: ");
1384
+ snprintf(buffer, sizeof(buffer), "%g", this->cold_white);
1385
+ out.append(buffer);
1386
+ out.append("\n");
1387
+
1388
+ out.append(" has_warm_white: ");
1389
+ out.append(YESNO(this->has_warm_white));
1390
+ out.append("\n");
1391
+
1392
+ out.append(" warm_white: ");
1393
+ snprintf(buffer, sizeof(buffer), "%g", this->warm_white);
1394
+ out.append(buffer);
1395
+ out.append("\n");
1396
+
1397
+ out.append(" has_transition_length: ");
1398
+ out.append(YESNO(this->has_transition_length));
1399
+ out.append("\n");
1400
+
1401
+ out.append(" transition_length: ");
1402
+ snprintf(buffer, sizeof(buffer), "%" PRIu32, this->transition_length);
1403
+ out.append(buffer);
1404
+ out.append("\n");
1405
+
1406
+ out.append(" has_flash_length: ");
1407
+ out.append(YESNO(this->has_flash_length));
1408
+ out.append("\n");
1409
+
1410
+ out.append(" flash_length: ");
1411
+ snprintf(buffer, sizeof(buffer), "%" PRIu32, this->flash_length);
1412
+ out.append(buffer);
1413
+ out.append("\n");
1414
+
1415
+ out.append(" has_effect: ");
1416
+ out.append(YESNO(this->has_effect));
1417
+ out.append("\n");
1418
+
1419
+ out.append(" effect: ");
1420
+ out.append("'").append(this->effect).append("'");
1421
+ out.append("\n");
1422
+ out.append("}");
1423
+ }
1424
+ #endif
1425
+ #ifdef USE_SENSOR
1426
+ void ListEntitiesSensorResponse::dump_to(std::string &out) const {
1427
+ __attribute__((unused)) char buffer[64];
1428
+ out.append("ListEntitiesSensorResponse {\n");
1429
+ out.append(" object_id: ");
1430
+ out.append("'").append(this->object_id).append("'");
1431
+ out.append("\n");
1432
+
1433
+ out.append(" key: ");
1434
+ snprintf(buffer, sizeof(buffer), "%" PRIu32, this->key);
1435
+ out.append(buffer);
1436
+ out.append("\n");
1437
+
1438
+ out.append(" name: ");
1439
+ out.append("'").append(this->name).append("'");
1440
+ out.append("\n");
1441
+
1442
+ out.append(" unique_id: ");
1443
+ out.append("'").append(this->unique_id).append("'");
1444
+ out.append("\n");
1445
+
1446
+ out.append(" icon: ");
1447
+ out.append("'").append(this->icon).append("'");
1448
+ out.append("\n");
1449
+
1450
+ out.append(" unit_of_measurement: ");
1451
+ out.append("'").append(this->unit_of_measurement).append("'");
1452
+ out.append("\n");
1453
+
1454
+ out.append(" accuracy_decimals: ");
1455
+ snprintf(buffer, sizeof(buffer), "%" PRId32, this->accuracy_decimals);
1456
+ out.append(buffer);
1457
+ out.append("\n");
1458
+
1459
+ out.append(" force_update: ");
1460
+ out.append(YESNO(this->force_update));
1461
+ out.append("\n");
1462
+
1463
+ out.append(" device_class: ");
1464
+ out.append("'").append(this->device_class).append("'");
1465
+ out.append("\n");
1466
+
1467
+ out.append(" state_class: ");
1468
+ out.append(proto_enum_to_string<enums::SensorStateClass>(this->state_class));
1469
+ out.append("\n");
1470
+
1471
+ out.append(" legacy_last_reset_type: ");
1472
+ out.append(proto_enum_to_string<enums::SensorLastResetType>(this->legacy_last_reset_type));
1473
+ out.append("\n");
1474
+
1475
+ out.append(" disabled_by_default: ");
1476
+ out.append(YESNO(this->disabled_by_default));
1477
+ out.append("\n");
1478
+
1479
+ out.append(" entity_category: ");
1480
+ out.append(proto_enum_to_string<enums::EntityCategory>(this->entity_category));
1481
+ out.append("\n");
1482
+
1483
+ out.append(" device_id: ");
1484
+ snprintf(buffer, sizeof(buffer), "%" PRIu32, this->device_id);
1485
+ out.append(buffer);
1486
+ out.append("\n");
1487
+ out.append("}");
1488
+ }
1489
+ void SensorStateResponse::dump_to(std::string &out) const {
1490
+ __attribute__((unused)) char buffer[64];
1491
+ out.append("SensorStateResponse {\n");
1492
+ out.append(" key: ");
1493
+ snprintf(buffer, sizeof(buffer), "%" PRIu32, this->key);
1494
+ out.append(buffer);
1495
+ out.append("\n");
1496
+
1497
+ out.append(" state: ");
1498
+ snprintf(buffer, sizeof(buffer), "%g", this->state);
1499
+ out.append(buffer);
1500
+ out.append("\n");
1501
+
1502
+ out.append(" missing_state: ");
1503
+ out.append(YESNO(this->missing_state));
1504
+ out.append("\n");
1505
+
1506
+ out.append(" device_id: ");
1507
+ snprintf(buffer, sizeof(buffer), "%" PRIu32, this->device_id);
1508
+ out.append(buffer);
1509
+ out.append("\n");
1510
+ out.append("}");
1511
+ }
1512
+ #endif
1513
+ #ifdef USE_SWITCH
1514
+ void ListEntitiesSwitchResponse::dump_to(std::string &out) const {
1515
+ __attribute__((unused)) char buffer[64];
1516
+ out.append("ListEntitiesSwitchResponse {\n");
1517
+ out.append(" object_id: ");
1518
+ out.append("'").append(this->object_id).append("'");
1519
+ out.append("\n");
1520
+
1521
+ out.append(" key: ");
1522
+ snprintf(buffer, sizeof(buffer), "%" PRIu32, this->key);
1523
+ out.append(buffer);
1524
+ out.append("\n");
1525
+
1526
+ out.append(" name: ");
1527
+ out.append("'").append(this->name).append("'");
1528
+ out.append("\n");
1529
+
1530
+ out.append(" unique_id: ");
1531
+ out.append("'").append(this->unique_id).append("'");
1532
+ out.append("\n");
1533
+
1534
+ out.append(" icon: ");
1535
+ out.append("'").append(this->icon).append("'");
1536
+ out.append("\n");
1537
+
1538
+ out.append(" assumed_state: ");
1539
+ out.append(YESNO(this->assumed_state));
1540
+ out.append("\n");
1541
+
1542
+ out.append(" disabled_by_default: ");
1543
+ out.append(YESNO(this->disabled_by_default));
1544
+ out.append("\n");
1545
+
1546
+ out.append(" entity_category: ");
1547
+ out.append(proto_enum_to_string<enums::EntityCategory>(this->entity_category));
1548
+ out.append("\n");
1549
+
1550
+ out.append(" device_class: ");
1551
+ out.append("'").append(this->device_class).append("'");
1552
+ out.append("\n");
1553
+
1554
+ out.append(" device_id: ");
1555
+ snprintf(buffer, sizeof(buffer), "%" PRIu32, this->device_id);
1556
+ out.append(buffer);
1557
+ out.append("\n");
1558
+ out.append("}");
1559
+ }
1560
+ void SwitchStateResponse::dump_to(std::string &out) const {
1561
+ __attribute__((unused)) char buffer[64];
1562
+ out.append("SwitchStateResponse {\n");
1563
+ out.append(" key: ");
1564
+ snprintf(buffer, sizeof(buffer), "%" PRIu32, this->key);
1565
+ out.append(buffer);
1566
+ out.append("\n");
1567
+
1568
+ out.append(" state: ");
1569
+ out.append(YESNO(this->state));
1570
+ out.append("\n");
1571
+
1572
+ out.append(" device_id: ");
1573
+ snprintf(buffer, sizeof(buffer), "%" PRIu32, this->device_id);
1574
+ out.append(buffer);
1575
+ out.append("\n");
1576
+ out.append("}");
1577
+ }
1578
+ void SwitchCommandRequest::dump_to(std::string &out) const {
1579
+ __attribute__((unused)) char buffer[64];
1580
+ out.append("SwitchCommandRequest {\n");
1581
+ out.append(" key: ");
1582
+ snprintf(buffer, sizeof(buffer), "%" PRIu32, this->key);
1583
+ out.append(buffer);
1584
+ out.append("\n");
1585
+
1586
+ out.append(" state: ");
1587
+ out.append(YESNO(this->state));
1588
+ out.append("\n");
1589
+ out.append("}");
1590
+ }
1591
+ #endif
1592
+ #ifdef USE_TEXT_SENSOR
1593
+ void ListEntitiesTextSensorResponse::dump_to(std::string &out) const {
1594
+ __attribute__((unused)) char buffer[64];
1595
+ out.append("ListEntitiesTextSensorResponse {\n");
1596
+ out.append(" object_id: ");
1597
+ out.append("'").append(this->object_id).append("'");
1598
+ out.append("\n");
1599
+
1600
+ out.append(" key: ");
1601
+ snprintf(buffer, sizeof(buffer), "%" PRIu32, this->key);
1602
+ out.append(buffer);
1603
+ out.append("\n");
1604
+
1605
+ out.append(" name: ");
1606
+ out.append("'").append(this->name).append("'");
1607
+ out.append("\n");
1608
+
1609
+ out.append(" unique_id: ");
1610
+ out.append("'").append(this->unique_id).append("'");
1611
+ out.append("\n");
1612
+
1613
+ out.append(" icon: ");
1614
+ out.append("'").append(this->icon).append("'");
1615
+ out.append("\n");
1616
+
1617
+ out.append(" disabled_by_default: ");
1618
+ out.append(YESNO(this->disabled_by_default));
1619
+ out.append("\n");
1620
+
1621
+ out.append(" entity_category: ");
1622
+ out.append(proto_enum_to_string<enums::EntityCategory>(this->entity_category));
1623
+ out.append("\n");
1624
+
1625
+ out.append(" device_class: ");
1626
+ out.append("'").append(this->device_class).append("'");
1627
+ out.append("\n");
1628
+
1629
+ out.append(" device_id: ");
1630
+ snprintf(buffer, sizeof(buffer), "%" PRIu32, this->device_id);
1631
+ out.append(buffer);
1632
+ out.append("\n");
1633
+ out.append("}");
1634
+ }
1635
+ void TextSensorStateResponse::dump_to(std::string &out) const {
1636
+ __attribute__((unused)) char buffer[64];
1637
+ out.append("TextSensorStateResponse {\n");
1638
+ out.append(" key: ");
1639
+ snprintf(buffer, sizeof(buffer), "%" PRIu32, this->key);
1640
+ out.append(buffer);
1641
+ out.append("\n");
1642
+
1643
+ out.append(" state: ");
1644
+ out.append("'").append(this->state).append("'");
1645
+ out.append("\n");
1646
+
1647
+ out.append(" missing_state: ");
1648
+ out.append(YESNO(this->missing_state));
1649
+ out.append("\n");
1650
+
1651
+ out.append(" device_id: ");
1652
+ snprintf(buffer, sizeof(buffer), "%" PRIu32, this->device_id);
1653
+ out.append(buffer);
1654
+ out.append("\n");
1655
+ out.append("}");
1656
+ }
1657
+ #endif
1658
+ void SubscribeLogsRequest::dump_to(std::string &out) const {
1659
+ __attribute__((unused)) char buffer[64];
1660
+ out.append("SubscribeLogsRequest {\n");
1661
+ out.append(" level: ");
1662
+ out.append(proto_enum_to_string<enums::LogLevel>(this->level));
1663
+ out.append("\n");
1664
+
1665
+ out.append(" dump_config: ");
1666
+ out.append(YESNO(this->dump_config));
1667
+ out.append("\n");
1668
+ out.append("}");
1669
+ }
1670
+ void SubscribeLogsResponse::dump_to(std::string &out) const {
1671
+ __attribute__((unused)) char buffer[64];
1672
+ out.append("SubscribeLogsResponse {\n");
1673
+ out.append(" level: ");
1674
+ out.append(proto_enum_to_string<enums::LogLevel>(this->level));
1675
+ out.append("\n");
1676
+
1677
+ out.append(" message: ");
1678
+ out.append(format_hex_pretty(this->message));
1679
+ out.append("\n");
1680
+
1681
+ out.append(" send_failed: ");
1682
+ out.append(YESNO(this->send_failed));
1683
+ out.append("\n");
1684
+ out.append("}");
1685
+ }
1686
+ #ifdef USE_API_NOISE
1687
+ void NoiseEncryptionSetKeyRequest::dump_to(std::string &out) const {
1688
+ __attribute__((unused)) char buffer[64];
1689
+ out.append("NoiseEncryptionSetKeyRequest {\n");
1690
+ out.append(" key: ");
1691
+ out.append(format_hex_pretty(this->key));
1692
+ out.append("\n");
1693
+ out.append("}");
1694
+ }
1695
+ void NoiseEncryptionSetKeyResponse::dump_to(std::string &out) const {
1696
+ __attribute__((unused)) char buffer[64];
1697
+ out.append("NoiseEncryptionSetKeyResponse {\n");
1698
+ out.append(" success: ");
1699
+ out.append(YESNO(this->success));
1700
+ out.append("\n");
1701
+ out.append("}");
1702
+ }
1703
+ #endif
1704
+ void SubscribeHomeassistantServicesRequest::dump_to(std::string &out) const {
1705
+ out.append("SubscribeHomeassistantServicesRequest {}");
1706
+ }
1707
+ void HomeassistantServiceMap::dump_to(std::string &out) const {
1708
+ __attribute__((unused)) char buffer[64];
1709
+ out.append("HomeassistantServiceMap {\n");
1710
+ out.append(" key: ");
1711
+ out.append("'").append(this->key).append("'");
1712
+ out.append("\n");
1713
+
1714
+ out.append(" value: ");
1715
+ out.append("'").append(this->value).append("'");
1716
+ out.append("\n");
1717
+ out.append("}");
1718
+ }
1719
+ void HomeassistantServiceResponse::dump_to(std::string &out) const {
1720
+ __attribute__((unused)) char buffer[64];
1721
+ out.append("HomeassistantServiceResponse {\n");
1722
+ out.append(" service: ");
1723
+ out.append("'").append(this->service).append("'");
1724
+ out.append("\n");
1725
+
1726
+ for (const auto &it : this->data) {
1727
+ out.append(" data: ");
1728
+ it.dump_to(out);
1729
+ out.append("\n");
1730
+ }
1731
+
1732
+ for (const auto &it : this->data_template) {
1733
+ out.append(" data_template: ");
1734
+ it.dump_to(out);
1735
+ out.append("\n");
1736
+ }
1737
+
1738
+ for (const auto &it : this->variables) {
1739
+ out.append(" variables: ");
1740
+ it.dump_to(out);
1741
+ out.append("\n");
1742
+ }
1743
+
1744
+ out.append(" is_event: ");
1745
+ out.append(YESNO(this->is_event));
1746
+ out.append("\n");
1747
+ out.append("}");
1748
+ }
1749
+ void SubscribeHomeAssistantStatesRequest::dump_to(std::string &out) const {
1750
+ out.append("SubscribeHomeAssistantStatesRequest {}");
1751
+ }
1752
+ void SubscribeHomeAssistantStateResponse::dump_to(std::string &out) const {
1753
+ __attribute__((unused)) char buffer[64];
1754
+ out.append("SubscribeHomeAssistantStateResponse {\n");
1755
+ out.append(" entity_id: ");
1756
+ out.append("'").append(this->entity_id).append("'");
1757
+ out.append("\n");
1758
+
1759
+ out.append(" attribute: ");
1760
+ out.append("'").append(this->attribute).append("'");
1761
+ out.append("\n");
1762
+
1763
+ out.append(" once: ");
1764
+ out.append(YESNO(this->once));
1765
+ out.append("\n");
1766
+ out.append("}");
1767
+ }
1768
+ void HomeAssistantStateResponse::dump_to(std::string &out) const {
1769
+ __attribute__((unused)) char buffer[64];
1770
+ out.append("HomeAssistantStateResponse {\n");
1771
+ out.append(" entity_id: ");
1772
+ out.append("'").append(this->entity_id).append("'");
1773
+ out.append("\n");
1774
+
1775
+ out.append(" state: ");
1776
+ out.append("'").append(this->state).append("'");
1777
+ out.append("\n");
1778
+
1779
+ out.append(" attribute: ");
1780
+ out.append("'").append(this->attribute).append("'");
1781
+ out.append("\n");
1782
+ out.append("}");
1783
+ }
1784
+ void GetTimeRequest::dump_to(std::string &out) const { out.append("GetTimeRequest {}"); }
1785
+ void GetTimeResponse::dump_to(std::string &out) const {
1786
+ __attribute__((unused)) char buffer[64];
1787
+ out.append("GetTimeResponse {\n");
1788
+ out.append(" epoch_seconds: ");
1789
+ snprintf(buffer, sizeof(buffer), "%" PRIu32, this->epoch_seconds);
1790
+ out.append(buffer);
1791
+ out.append("\n");
1792
+ out.append("}");
1793
+ }
1794
+ void ListEntitiesServicesArgument::dump_to(std::string &out) const {
1795
+ __attribute__((unused)) char buffer[64];
1796
+ out.append("ListEntitiesServicesArgument {\n");
1797
+ out.append(" name: ");
1798
+ out.append("'").append(this->name).append("'");
1799
+ out.append("\n");
1800
+
1801
+ out.append(" type: ");
1802
+ out.append(proto_enum_to_string<enums::ServiceArgType>(this->type));
1803
+ out.append("\n");
1804
+ out.append("}");
1805
+ }
1806
+ void ListEntitiesServicesResponse::dump_to(std::string &out) const {
1807
+ __attribute__((unused)) char buffer[64];
1808
+ out.append("ListEntitiesServicesResponse {\n");
1809
+ out.append(" name: ");
1810
+ out.append("'").append(this->name).append("'");
1811
+ out.append("\n");
1812
+
1813
+ out.append(" key: ");
1814
+ snprintf(buffer, sizeof(buffer), "%" PRIu32, this->key);
1815
+ out.append(buffer);
1816
+ out.append("\n");
1817
+
1818
+ for (const auto &it : this->args) {
1819
+ out.append(" args: ");
1820
+ it.dump_to(out);
1821
+ out.append("\n");
1822
+ }
1823
+ out.append("}");
1824
+ }
1825
+ void ExecuteServiceArgument::dump_to(std::string &out) const {
1826
+ __attribute__((unused)) char buffer[64];
1827
+ out.append("ExecuteServiceArgument {\n");
1828
+ out.append(" bool_: ");
1829
+ out.append(YESNO(this->bool_));
1830
+ out.append("\n");
1831
+
1832
+ out.append(" legacy_int: ");
1833
+ snprintf(buffer, sizeof(buffer), "%" PRId32, this->legacy_int);
1834
+ out.append(buffer);
1835
+ out.append("\n");
1836
+
1837
+ out.append(" float_: ");
1838
+ snprintf(buffer, sizeof(buffer), "%g", this->float_);
1839
+ out.append(buffer);
1840
+ out.append("\n");
1841
+
1842
+ out.append(" string_: ");
1843
+ out.append("'").append(this->string_).append("'");
1844
+ out.append("\n");
1845
+
1846
+ out.append(" int_: ");
1847
+ snprintf(buffer, sizeof(buffer), "%" PRId32, this->int_);
1848
+ out.append(buffer);
1849
+ out.append("\n");
1850
+
1851
+ for (const auto it : this->bool_array) {
1852
+ out.append(" bool_array: ");
1853
+ out.append(YESNO(it));
1854
+ out.append("\n");
1855
+ }
1856
+
1857
+ for (const auto &it : this->int_array) {
1858
+ out.append(" int_array: ");
1859
+ snprintf(buffer, sizeof(buffer), "%" PRId32, it);
1860
+ out.append(buffer);
1861
+ out.append("\n");
1862
+ }
1863
+
1864
+ for (const auto &it : this->float_array) {
1865
+ out.append(" float_array: ");
1866
+ snprintf(buffer, sizeof(buffer), "%g", it);
1867
+ out.append(buffer);
1868
+ out.append("\n");
1869
+ }
1870
+
1871
+ for (const auto &it : this->string_array) {
1872
+ out.append(" string_array: ");
1873
+ out.append("'").append(it).append("'");
1874
+ out.append("\n");
1875
+ }
1876
+ out.append("}");
1877
+ }
1878
+ void ExecuteServiceRequest::dump_to(std::string &out) const {
1879
+ __attribute__((unused)) char buffer[64];
1880
+ out.append("ExecuteServiceRequest {\n");
1881
+ out.append(" key: ");
1882
+ snprintf(buffer, sizeof(buffer), "%" PRIu32, this->key);
1883
+ out.append(buffer);
1884
+ out.append("\n");
1885
+
1886
+ for (const auto &it : this->args) {
1887
+ out.append(" args: ");
1888
+ it.dump_to(out);
1889
+ out.append("\n");
1890
+ }
1891
+ out.append("}");
1892
+ }
1893
+ #ifdef USE_CAMERA
1894
+ void ListEntitiesCameraResponse::dump_to(std::string &out) const {
1895
+ __attribute__((unused)) char buffer[64];
1896
+ out.append("ListEntitiesCameraResponse {\n");
1897
+ out.append(" object_id: ");
1898
+ out.append("'").append(this->object_id).append("'");
1899
+ out.append("\n");
1900
+
1901
+ out.append(" key: ");
1902
+ snprintf(buffer, sizeof(buffer), "%" PRIu32, this->key);
1903
+ out.append(buffer);
1904
+ out.append("\n");
1905
+
1906
+ out.append(" name: ");
1907
+ out.append("'").append(this->name).append("'");
1908
+ out.append("\n");
1909
+
1910
+ out.append(" unique_id: ");
1911
+ out.append("'").append(this->unique_id).append("'");
1912
+ out.append("\n");
1913
+
1914
+ out.append(" disabled_by_default: ");
1915
+ out.append(YESNO(this->disabled_by_default));
1916
+ out.append("\n");
1917
+
1918
+ out.append(" icon: ");
1919
+ out.append("'").append(this->icon).append("'");
1920
+ out.append("\n");
1921
+
1922
+ out.append(" entity_category: ");
1923
+ out.append(proto_enum_to_string<enums::EntityCategory>(this->entity_category));
1924
+ out.append("\n");
1925
+
1926
+ out.append(" device_id: ");
1927
+ snprintf(buffer, sizeof(buffer), "%" PRIu32, this->device_id);
1928
+ out.append(buffer);
1929
+ out.append("\n");
1930
+ out.append("}");
1931
+ }
1932
+ void CameraImageResponse::dump_to(std::string &out) const {
1933
+ __attribute__((unused)) char buffer[64];
1934
+ out.append("CameraImageResponse {\n");
1935
+ out.append(" key: ");
1936
+ snprintf(buffer, sizeof(buffer), "%" PRIu32, this->key);
1937
+ out.append(buffer);
1938
+ out.append("\n");
1939
+
1940
+ out.append(" data: ");
1941
+ out.append(format_hex_pretty(this->data));
1942
+ out.append("\n");
1943
+
1944
+ out.append(" done: ");
1945
+ out.append(YESNO(this->done));
1946
+ out.append("\n");
1947
+ out.append("}");
1948
+ }
1949
+ void CameraImageRequest::dump_to(std::string &out) const {
1950
+ __attribute__((unused)) char buffer[64];
1951
+ out.append("CameraImageRequest {\n");
1952
+ out.append(" single: ");
1953
+ out.append(YESNO(this->single));
1954
+ out.append("\n");
1955
+
1956
+ out.append(" stream: ");
1957
+ out.append(YESNO(this->stream));
1958
+ out.append("\n");
1959
+ out.append("}");
1960
+ }
1961
+ #endif
1962
+ #ifdef USE_CLIMATE
1963
+ void ListEntitiesClimateResponse::dump_to(std::string &out) const {
1964
+ __attribute__((unused)) char buffer[64];
1965
+ out.append("ListEntitiesClimateResponse {\n");
1966
+ out.append(" object_id: ");
1967
+ out.append("'").append(this->object_id).append("'");
1968
+ out.append("\n");
1969
+
1970
+ out.append(" key: ");
1971
+ snprintf(buffer, sizeof(buffer), "%" PRIu32, this->key);
1972
+ out.append(buffer);
1973
+ out.append("\n");
1974
+
1975
+ out.append(" name: ");
1976
+ out.append("'").append(this->name).append("'");
1977
+ out.append("\n");
1978
+
1979
+ out.append(" unique_id: ");
1980
+ out.append("'").append(this->unique_id).append("'");
1981
+ out.append("\n");
1982
+
1983
+ out.append(" supports_current_temperature: ");
1984
+ out.append(YESNO(this->supports_current_temperature));
1985
+ out.append("\n");
1986
+
1987
+ out.append(" supports_two_point_target_temperature: ");
1988
+ out.append(YESNO(this->supports_two_point_target_temperature));
1989
+ out.append("\n");
1990
+
1991
+ for (const auto &it : this->supported_modes) {
1992
+ out.append(" supported_modes: ");
1993
+ out.append(proto_enum_to_string<enums::ClimateMode>(it));
1994
+ out.append("\n");
1995
+ }
1996
+
1997
+ out.append(" visual_min_temperature: ");
1998
+ snprintf(buffer, sizeof(buffer), "%g", this->visual_min_temperature);
1999
+ out.append(buffer);
2000
+ out.append("\n");
2001
+
2002
+ out.append(" visual_max_temperature: ");
2003
+ snprintf(buffer, sizeof(buffer), "%g", this->visual_max_temperature);
2004
+ out.append(buffer);
2005
+ out.append("\n");
2006
+
2007
+ out.append(" visual_target_temperature_step: ");
2008
+ snprintf(buffer, sizeof(buffer), "%g", this->visual_target_temperature_step);
2009
+ out.append(buffer);
2010
+ out.append("\n");
2011
+
2012
+ out.append(" legacy_supports_away: ");
2013
+ out.append(YESNO(this->legacy_supports_away));
2014
+ out.append("\n");
2015
+
2016
+ out.append(" supports_action: ");
2017
+ out.append(YESNO(this->supports_action));
2018
+ out.append("\n");
2019
+
2020
+ for (const auto &it : this->supported_fan_modes) {
2021
+ out.append(" supported_fan_modes: ");
2022
+ out.append(proto_enum_to_string<enums::ClimateFanMode>(it));
2023
+ out.append("\n");
2024
+ }
2025
+
2026
+ for (const auto &it : this->supported_swing_modes) {
2027
+ out.append(" supported_swing_modes: ");
2028
+ out.append(proto_enum_to_string<enums::ClimateSwingMode>(it));
2029
+ out.append("\n");
2030
+ }
2031
+
2032
+ for (const auto &it : this->supported_custom_fan_modes) {
2033
+ out.append(" supported_custom_fan_modes: ");
2034
+ out.append("'").append(it).append("'");
2035
+ out.append("\n");
2036
+ }
2037
+
2038
+ for (const auto &it : this->supported_presets) {
2039
+ out.append(" supported_presets: ");
2040
+ out.append(proto_enum_to_string<enums::ClimatePreset>(it));
2041
+ out.append("\n");
2042
+ }
2043
+
2044
+ for (const auto &it : this->supported_custom_presets) {
2045
+ out.append(" supported_custom_presets: ");
2046
+ out.append("'").append(it).append("'");
2047
+ out.append("\n");
2048
+ }
2049
+
2050
+ out.append(" disabled_by_default: ");
2051
+ out.append(YESNO(this->disabled_by_default));
2052
+ out.append("\n");
2053
+
2054
+ out.append(" icon: ");
2055
+ out.append("'").append(this->icon).append("'");
2056
+ out.append("\n");
2057
+
2058
+ out.append(" entity_category: ");
2059
+ out.append(proto_enum_to_string<enums::EntityCategory>(this->entity_category));
2060
+ out.append("\n");
2061
+
2062
+ out.append(" visual_current_temperature_step: ");
2063
+ snprintf(buffer, sizeof(buffer), "%g", this->visual_current_temperature_step);
2064
+ out.append(buffer);
2065
+ out.append("\n");
2066
+
2067
+ out.append(" supports_current_humidity: ");
2068
+ out.append(YESNO(this->supports_current_humidity));
2069
+ out.append("\n");
2070
+
2071
+ out.append(" supports_target_humidity: ");
2072
+ out.append(YESNO(this->supports_target_humidity));
2073
+ out.append("\n");
2074
+
2075
+ out.append(" visual_min_humidity: ");
2076
+ snprintf(buffer, sizeof(buffer), "%g", this->visual_min_humidity);
2077
+ out.append(buffer);
2078
+ out.append("\n");
2079
+
2080
+ out.append(" visual_max_humidity: ");
2081
+ snprintf(buffer, sizeof(buffer), "%g", this->visual_max_humidity);
2082
+ out.append(buffer);
2083
+ out.append("\n");
2084
+
2085
+ out.append(" device_id: ");
2086
+ snprintf(buffer, sizeof(buffer), "%" PRIu32, this->device_id);
2087
+ out.append(buffer);
2088
+ out.append("\n");
2089
+ out.append("}");
2090
+ }
2091
+ void ClimateStateResponse::dump_to(std::string &out) const {
2092
+ __attribute__((unused)) char buffer[64];
2093
+ out.append("ClimateStateResponse {\n");
2094
+ out.append(" key: ");
2095
+ snprintf(buffer, sizeof(buffer), "%" PRIu32, this->key);
2096
+ out.append(buffer);
2097
+ out.append("\n");
2098
+
2099
+ out.append(" mode: ");
2100
+ out.append(proto_enum_to_string<enums::ClimateMode>(this->mode));
2101
+ out.append("\n");
2102
+
2103
+ out.append(" current_temperature: ");
2104
+ snprintf(buffer, sizeof(buffer), "%g", this->current_temperature);
2105
+ out.append(buffer);
2106
+ out.append("\n");
2107
+
2108
+ out.append(" target_temperature: ");
2109
+ snprintf(buffer, sizeof(buffer), "%g", this->target_temperature);
2110
+ out.append(buffer);
2111
+ out.append("\n");
2112
+
2113
+ out.append(" target_temperature_low: ");
2114
+ snprintf(buffer, sizeof(buffer), "%g", this->target_temperature_low);
2115
+ out.append(buffer);
2116
+ out.append("\n");
2117
+
2118
+ out.append(" target_temperature_high: ");
2119
+ snprintf(buffer, sizeof(buffer), "%g", this->target_temperature_high);
2120
+ out.append(buffer);
2121
+ out.append("\n");
2122
+
2123
+ out.append(" unused_legacy_away: ");
2124
+ out.append(YESNO(this->unused_legacy_away));
2125
+ out.append("\n");
2126
+
2127
+ out.append(" action: ");
2128
+ out.append(proto_enum_to_string<enums::ClimateAction>(this->action));
2129
+ out.append("\n");
2130
+
2131
+ out.append(" fan_mode: ");
2132
+ out.append(proto_enum_to_string<enums::ClimateFanMode>(this->fan_mode));
2133
+ out.append("\n");
2134
+
2135
+ out.append(" swing_mode: ");
2136
+ out.append(proto_enum_to_string<enums::ClimateSwingMode>(this->swing_mode));
2137
+ out.append("\n");
2138
+
2139
+ out.append(" custom_fan_mode: ");
2140
+ out.append("'").append(this->custom_fan_mode).append("'");
2141
+ out.append("\n");
2142
+
2143
+ out.append(" preset: ");
2144
+ out.append(proto_enum_to_string<enums::ClimatePreset>(this->preset));
2145
+ out.append("\n");
2146
+
2147
+ out.append(" custom_preset: ");
2148
+ out.append("'").append(this->custom_preset).append("'");
2149
+ out.append("\n");
2150
+
2151
+ out.append(" current_humidity: ");
2152
+ snprintf(buffer, sizeof(buffer), "%g", this->current_humidity);
2153
+ out.append(buffer);
2154
+ out.append("\n");
2155
+
2156
+ out.append(" target_humidity: ");
2157
+ snprintf(buffer, sizeof(buffer), "%g", this->target_humidity);
2158
+ out.append(buffer);
2159
+ out.append("\n");
2160
+
2161
+ out.append(" device_id: ");
2162
+ snprintf(buffer, sizeof(buffer), "%" PRIu32, this->device_id);
2163
+ out.append(buffer);
2164
+ out.append("\n");
2165
+ out.append("}");
2166
+ }
2167
+ void ClimateCommandRequest::dump_to(std::string &out) const {
2168
+ __attribute__((unused)) char buffer[64];
2169
+ out.append("ClimateCommandRequest {\n");
2170
+ out.append(" key: ");
2171
+ snprintf(buffer, sizeof(buffer), "%" PRIu32, this->key);
2172
+ out.append(buffer);
2173
+ out.append("\n");
2174
+
2175
+ out.append(" has_mode: ");
2176
+ out.append(YESNO(this->has_mode));
2177
+ out.append("\n");
2178
+
2179
+ out.append(" mode: ");
2180
+ out.append(proto_enum_to_string<enums::ClimateMode>(this->mode));
2181
+ out.append("\n");
2182
+
2183
+ out.append(" has_target_temperature: ");
2184
+ out.append(YESNO(this->has_target_temperature));
2185
+ out.append("\n");
2186
+
2187
+ out.append(" target_temperature: ");
2188
+ snprintf(buffer, sizeof(buffer), "%g", this->target_temperature);
2189
+ out.append(buffer);
2190
+ out.append("\n");
2191
+
2192
+ out.append(" has_target_temperature_low: ");
2193
+ out.append(YESNO(this->has_target_temperature_low));
2194
+ out.append("\n");
2195
+
2196
+ out.append(" target_temperature_low: ");
2197
+ snprintf(buffer, sizeof(buffer), "%g", this->target_temperature_low);
2198
+ out.append(buffer);
2199
+ out.append("\n");
2200
+
2201
+ out.append(" has_target_temperature_high: ");
2202
+ out.append(YESNO(this->has_target_temperature_high));
2203
+ out.append("\n");
2204
+
2205
+ out.append(" target_temperature_high: ");
2206
+ snprintf(buffer, sizeof(buffer), "%g", this->target_temperature_high);
2207
+ out.append(buffer);
2208
+ out.append("\n");
2209
+
2210
+ out.append(" unused_has_legacy_away: ");
2211
+ out.append(YESNO(this->unused_has_legacy_away));
2212
+ out.append("\n");
2213
+
2214
+ out.append(" unused_legacy_away: ");
2215
+ out.append(YESNO(this->unused_legacy_away));
2216
+ out.append("\n");
2217
+
2218
+ out.append(" has_fan_mode: ");
2219
+ out.append(YESNO(this->has_fan_mode));
2220
+ out.append("\n");
2221
+
2222
+ out.append(" fan_mode: ");
2223
+ out.append(proto_enum_to_string<enums::ClimateFanMode>(this->fan_mode));
2224
+ out.append("\n");
2225
+
2226
+ out.append(" has_swing_mode: ");
2227
+ out.append(YESNO(this->has_swing_mode));
2228
+ out.append("\n");
2229
+
2230
+ out.append(" swing_mode: ");
2231
+ out.append(proto_enum_to_string<enums::ClimateSwingMode>(this->swing_mode));
2232
+ out.append("\n");
2233
+
2234
+ out.append(" has_custom_fan_mode: ");
2235
+ out.append(YESNO(this->has_custom_fan_mode));
2236
+ out.append("\n");
2237
+
2238
+ out.append(" custom_fan_mode: ");
2239
+ out.append("'").append(this->custom_fan_mode).append("'");
2240
+ out.append("\n");
2241
+
2242
+ out.append(" has_preset: ");
2243
+ out.append(YESNO(this->has_preset));
2244
+ out.append("\n");
2245
+
2246
+ out.append(" preset: ");
2247
+ out.append(proto_enum_to_string<enums::ClimatePreset>(this->preset));
2248
+ out.append("\n");
2249
+
2250
+ out.append(" has_custom_preset: ");
2251
+ out.append(YESNO(this->has_custom_preset));
2252
+ out.append("\n");
2253
+
2254
+ out.append(" custom_preset: ");
2255
+ out.append("'").append(this->custom_preset).append("'");
2256
+ out.append("\n");
2257
+
2258
+ out.append(" has_target_humidity: ");
2259
+ out.append(YESNO(this->has_target_humidity));
2260
+ out.append("\n");
2261
+
2262
+ out.append(" target_humidity: ");
2263
+ snprintf(buffer, sizeof(buffer), "%g", this->target_humidity);
2264
+ out.append(buffer);
2265
+ out.append("\n");
2266
+ out.append("}");
2267
+ }
2268
+ #endif
2269
+ #ifdef USE_NUMBER
2270
+ void ListEntitiesNumberResponse::dump_to(std::string &out) const {
2271
+ __attribute__((unused)) char buffer[64];
2272
+ out.append("ListEntitiesNumberResponse {\n");
2273
+ out.append(" object_id: ");
2274
+ out.append("'").append(this->object_id).append("'");
2275
+ out.append("\n");
2276
+
2277
+ out.append(" key: ");
2278
+ snprintf(buffer, sizeof(buffer), "%" PRIu32, this->key);
2279
+ out.append(buffer);
2280
+ out.append("\n");
2281
+
2282
+ out.append(" name: ");
2283
+ out.append("'").append(this->name).append("'");
2284
+ out.append("\n");
2285
+
2286
+ out.append(" unique_id: ");
2287
+ out.append("'").append(this->unique_id).append("'");
2288
+ out.append("\n");
2289
+
2290
+ out.append(" icon: ");
2291
+ out.append("'").append(this->icon).append("'");
2292
+ out.append("\n");
2293
+
2294
+ out.append(" min_value: ");
2295
+ snprintf(buffer, sizeof(buffer), "%g", this->min_value);
2296
+ out.append(buffer);
2297
+ out.append("\n");
2298
+
2299
+ out.append(" max_value: ");
2300
+ snprintf(buffer, sizeof(buffer), "%g", this->max_value);
2301
+ out.append(buffer);
2302
+ out.append("\n");
2303
+
2304
+ out.append(" step: ");
2305
+ snprintf(buffer, sizeof(buffer), "%g", this->step);
2306
+ out.append(buffer);
2307
+ out.append("\n");
2308
+
2309
+ out.append(" disabled_by_default: ");
2310
+ out.append(YESNO(this->disabled_by_default));
2311
+ out.append("\n");
2312
+
2313
+ out.append(" entity_category: ");
2314
+ out.append(proto_enum_to_string<enums::EntityCategory>(this->entity_category));
2315
+ out.append("\n");
2316
+
2317
+ out.append(" unit_of_measurement: ");
2318
+ out.append("'").append(this->unit_of_measurement).append("'");
2319
+ out.append("\n");
2320
+
2321
+ out.append(" mode: ");
2322
+ out.append(proto_enum_to_string<enums::NumberMode>(this->mode));
2323
+ out.append("\n");
2324
+
2325
+ out.append(" device_class: ");
2326
+ out.append("'").append(this->device_class).append("'");
2327
+ out.append("\n");
2328
+
2329
+ out.append(" device_id: ");
2330
+ snprintf(buffer, sizeof(buffer), "%" PRIu32, this->device_id);
2331
+ out.append(buffer);
2332
+ out.append("\n");
2333
+ out.append("}");
2334
+ }
2335
+ void NumberStateResponse::dump_to(std::string &out) const {
2336
+ __attribute__((unused)) char buffer[64];
2337
+ out.append("NumberStateResponse {\n");
2338
+ out.append(" key: ");
2339
+ snprintf(buffer, sizeof(buffer), "%" PRIu32, this->key);
2340
+ out.append(buffer);
2341
+ out.append("\n");
2342
+
2343
+ out.append(" state: ");
2344
+ snprintf(buffer, sizeof(buffer), "%g", this->state);
2345
+ out.append(buffer);
2346
+ out.append("\n");
2347
+
2348
+ out.append(" missing_state: ");
2349
+ out.append(YESNO(this->missing_state));
2350
+ out.append("\n");
2351
+
2352
+ out.append(" device_id: ");
2353
+ snprintf(buffer, sizeof(buffer), "%" PRIu32, this->device_id);
2354
+ out.append(buffer);
2355
+ out.append("\n");
2356
+ out.append("}");
2357
+ }
2358
+ void NumberCommandRequest::dump_to(std::string &out) const {
2359
+ __attribute__((unused)) char buffer[64];
2360
+ out.append("NumberCommandRequest {\n");
2361
+ out.append(" key: ");
2362
+ snprintf(buffer, sizeof(buffer), "%" PRIu32, this->key);
2363
+ out.append(buffer);
2364
+ out.append("\n");
2365
+
2366
+ out.append(" state: ");
2367
+ snprintf(buffer, sizeof(buffer), "%g", this->state);
2368
+ out.append(buffer);
2369
+ out.append("\n");
2370
+ out.append("}");
2371
+ }
2372
+ #endif
2373
+ #ifdef USE_SELECT
2374
+ void ListEntitiesSelectResponse::dump_to(std::string &out) const {
2375
+ __attribute__((unused)) char buffer[64];
2376
+ out.append("ListEntitiesSelectResponse {\n");
2377
+ out.append(" object_id: ");
2378
+ out.append("'").append(this->object_id).append("'");
2379
+ out.append("\n");
2380
+
2381
+ out.append(" key: ");
2382
+ snprintf(buffer, sizeof(buffer), "%" PRIu32, this->key);
2383
+ out.append(buffer);
2384
+ out.append("\n");
2385
+
2386
+ out.append(" name: ");
2387
+ out.append("'").append(this->name).append("'");
2388
+ out.append("\n");
2389
+
2390
+ out.append(" unique_id: ");
2391
+ out.append("'").append(this->unique_id).append("'");
2392
+ out.append("\n");
2393
+
2394
+ out.append(" icon: ");
2395
+ out.append("'").append(this->icon).append("'");
2396
+ out.append("\n");
2397
+
2398
+ for (const auto &it : this->options) {
2399
+ out.append(" options: ");
2400
+ out.append("'").append(it).append("'");
2401
+ out.append("\n");
2402
+ }
2403
+
2404
+ out.append(" disabled_by_default: ");
2405
+ out.append(YESNO(this->disabled_by_default));
2406
+ out.append("\n");
2407
+
2408
+ out.append(" entity_category: ");
2409
+ out.append(proto_enum_to_string<enums::EntityCategory>(this->entity_category));
2410
+ out.append("\n");
2411
+
2412
+ out.append(" device_id: ");
2413
+ snprintf(buffer, sizeof(buffer), "%" PRIu32, this->device_id);
2414
+ out.append(buffer);
2415
+ out.append("\n");
2416
+ out.append("}");
2417
+ }
2418
+ void SelectStateResponse::dump_to(std::string &out) const {
2419
+ __attribute__((unused)) char buffer[64];
2420
+ out.append("SelectStateResponse {\n");
2421
+ out.append(" key: ");
2422
+ snprintf(buffer, sizeof(buffer), "%" PRIu32, this->key);
2423
+ out.append(buffer);
2424
+ out.append("\n");
2425
+
2426
+ out.append(" state: ");
2427
+ out.append("'").append(this->state).append("'");
2428
+ out.append("\n");
2429
+
2430
+ out.append(" missing_state: ");
2431
+ out.append(YESNO(this->missing_state));
2432
+ out.append("\n");
2433
+
2434
+ out.append(" device_id: ");
2435
+ snprintf(buffer, sizeof(buffer), "%" PRIu32, this->device_id);
2436
+ out.append(buffer);
2437
+ out.append("\n");
2438
+ out.append("}");
2439
+ }
2440
+ void SelectCommandRequest::dump_to(std::string &out) const {
2441
+ __attribute__((unused)) char buffer[64];
2442
+ out.append("SelectCommandRequest {\n");
2443
+ out.append(" key: ");
2444
+ snprintf(buffer, sizeof(buffer), "%" PRIu32, this->key);
2445
+ out.append(buffer);
2446
+ out.append("\n");
2447
+
2448
+ out.append(" state: ");
2449
+ out.append("'").append(this->state).append("'");
2450
+ out.append("\n");
2451
+ out.append("}");
2452
+ }
2453
+ #endif
2454
+ #ifdef USE_SIREN
2455
+ void ListEntitiesSirenResponse::dump_to(std::string &out) const {
2456
+ __attribute__((unused)) char buffer[64];
2457
+ out.append("ListEntitiesSirenResponse {\n");
2458
+ out.append(" object_id: ");
2459
+ out.append("'").append(this->object_id).append("'");
2460
+ out.append("\n");
2461
+
2462
+ out.append(" key: ");
2463
+ snprintf(buffer, sizeof(buffer), "%" PRIu32, this->key);
2464
+ out.append(buffer);
2465
+ out.append("\n");
2466
+
2467
+ out.append(" name: ");
2468
+ out.append("'").append(this->name).append("'");
2469
+ out.append("\n");
2470
+
2471
+ out.append(" unique_id: ");
2472
+ out.append("'").append(this->unique_id).append("'");
2473
+ out.append("\n");
2474
+
2475
+ out.append(" icon: ");
2476
+ out.append("'").append(this->icon).append("'");
2477
+ out.append("\n");
2478
+
2479
+ out.append(" disabled_by_default: ");
2480
+ out.append(YESNO(this->disabled_by_default));
2481
+ out.append("\n");
2482
+
2483
+ for (const auto &it : this->tones) {
2484
+ out.append(" tones: ");
2485
+ out.append("'").append(it).append("'");
2486
+ out.append("\n");
2487
+ }
2488
+
2489
+ out.append(" supports_duration: ");
2490
+ out.append(YESNO(this->supports_duration));
2491
+ out.append("\n");
2492
+
2493
+ out.append(" supports_volume: ");
2494
+ out.append(YESNO(this->supports_volume));
2495
+ out.append("\n");
2496
+
2497
+ out.append(" entity_category: ");
2498
+ out.append(proto_enum_to_string<enums::EntityCategory>(this->entity_category));
2499
+ out.append("\n");
2500
+
2501
+ out.append(" device_id: ");
2502
+ snprintf(buffer, sizeof(buffer), "%" PRIu32, this->device_id);
2503
+ out.append(buffer);
2504
+ out.append("\n");
2505
+ out.append("}");
2506
+ }
2507
+ void SirenStateResponse::dump_to(std::string &out) const {
2508
+ __attribute__((unused)) char buffer[64];
2509
+ out.append("SirenStateResponse {\n");
2510
+ out.append(" key: ");
2511
+ snprintf(buffer, sizeof(buffer), "%" PRIu32, this->key);
2512
+ out.append(buffer);
2513
+ out.append("\n");
2514
+
2515
+ out.append(" state: ");
2516
+ out.append(YESNO(this->state));
2517
+ out.append("\n");
2518
+
2519
+ out.append(" device_id: ");
2520
+ snprintf(buffer, sizeof(buffer), "%" PRIu32, this->device_id);
2521
+ out.append(buffer);
2522
+ out.append("\n");
2523
+ out.append("}");
2524
+ }
2525
+ void SirenCommandRequest::dump_to(std::string &out) const {
2526
+ __attribute__((unused)) char buffer[64];
2527
+ out.append("SirenCommandRequest {\n");
2528
+ out.append(" key: ");
2529
+ snprintf(buffer, sizeof(buffer), "%" PRIu32, this->key);
2530
+ out.append(buffer);
2531
+ out.append("\n");
2532
+
2533
+ out.append(" has_state: ");
2534
+ out.append(YESNO(this->has_state));
2535
+ out.append("\n");
2536
+
2537
+ out.append(" state: ");
2538
+ out.append(YESNO(this->state));
2539
+ out.append("\n");
2540
+
2541
+ out.append(" has_tone: ");
2542
+ out.append(YESNO(this->has_tone));
2543
+ out.append("\n");
2544
+
2545
+ out.append(" tone: ");
2546
+ out.append("'").append(this->tone).append("'");
2547
+ out.append("\n");
2548
+
2549
+ out.append(" has_duration: ");
2550
+ out.append(YESNO(this->has_duration));
2551
+ out.append("\n");
2552
+
2553
+ out.append(" duration: ");
2554
+ snprintf(buffer, sizeof(buffer), "%" PRIu32, this->duration);
2555
+ out.append(buffer);
2556
+ out.append("\n");
2557
+
2558
+ out.append(" has_volume: ");
2559
+ out.append(YESNO(this->has_volume));
2560
+ out.append("\n");
2561
+
2562
+ out.append(" volume: ");
2563
+ snprintf(buffer, sizeof(buffer), "%g", this->volume);
2564
+ out.append(buffer);
2565
+ out.append("\n");
2566
+ out.append("}");
2567
+ }
2568
+ #endif
2569
+ #ifdef USE_LOCK
2570
+ void ListEntitiesLockResponse::dump_to(std::string &out) const {
2571
+ __attribute__((unused)) char buffer[64];
2572
+ out.append("ListEntitiesLockResponse {\n");
2573
+ out.append(" object_id: ");
2574
+ out.append("'").append(this->object_id).append("'");
2575
+ out.append("\n");
2576
+
2577
+ out.append(" key: ");
2578
+ snprintf(buffer, sizeof(buffer), "%" PRIu32, this->key);
2579
+ out.append(buffer);
2580
+ out.append("\n");
2581
+
2582
+ out.append(" name: ");
2583
+ out.append("'").append(this->name).append("'");
2584
+ out.append("\n");
2585
+
2586
+ out.append(" unique_id: ");
2587
+ out.append("'").append(this->unique_id).append("'");
2588
+ out.append("\n");
2589
+
2590
+ out.append(" icon: ");
2591
+ out.append("'").append(this->icon).append("'");
2592
+ out.append("\n");
2593
+
2594
+ out.append(" disabled_by_default: ");
2595
+ out.append(YESNO(this->disabled_by_default));
2596
+ out.append("\n");
2597
+
2598
+ out.append(" entity_category: ");
2599
+ out.append(proto_enum_to_string<enums::EntityCategory>(this->entity_category));
2600
+ out.append("\n");
2601
+
2602
+ out.append(" assumed_state: ");
2603
+ out.append(YESNO(this->assumed_state));
2604
+ out.append("\n");
2605
+
2606
+ out.append(" supports_open: ");
2607
+ out.append(YESNO(this->supports_open));
2608
+ out.append("\n");
2609
+
2610
+ out.append(" requires_code: ");
2611
+ out.append(YESNO(this->requires_code));
2612
+ out.append("\n");
2613
+
2614
+ out.append(" code_format: ");
2615
+ out.append("'").append(this->code_format).append("'");
2616
+ out.append("\n");
2617
+
2618
+ out.append(" device_id: ");
2619
+ snprintf(buffer, sizeof(buffer), "%" PRIu32, this->device_id);
2620
+ out.append(buffer);
2621
+ out.append("\n");
2622
+ out.append("}");
2623
+ }
2624
+ void LockStateResponse::dump_to(std::string &out) const {
2625
+ __attribute__((unused)) char buffer[64];
2626
+ out.append("LockStateResponse {\n");
2627
+ out.append(" key: ");
2628
+ snprintf(buffer, sizeof(buffer), "%" PRIu32, this->key);
2629
+ out.append(buffer);
2630
+ out.append("\n");
2631
+
2632
+ out.append(" state: ");
2633
+ out.append(proto_enum_to_string<enums::LockState>(this->state));
2634
+ out.append("\n");
2635
+
2636
+ out.append(" device_id: ");
2637
+ snprintf(buffer, sizeof(buffer), "%" PRIu32, this->device_id);
2638
+ out.append(buffer);
2639
+ out.append("\n");
2640
+ out.append("}");
2641
+ }
2642
+ void LockCommandRequest::dump_to(std::string &out) const {
2643
+ __attribute__((unused)) char buffer[64];
2644
+ out.append("LockCommandRequest {\n");
2645
+ out.append(" key: ");
2646
+ snprintf(buffer, sizeof(buffer), "%" PRIu32, this->key);
2647
+ out.append(buffer);
2648
+ out.append("\n");
2649
+
2650
+ out.append(" command: ");
2651
+ out.append(proto_enum_to_string<enums::LockCommand>(this->command));
2652
+ out.append("\n");
2653
+
2654
+ out.append(" has_code: ");
2655
+ out.append(YESNO(this->has_code));
2656
+ out.append("\n");
2657
+
2658
+ out.append(" code: ");
2659
+ out.append("'").append(this->code).append("'");
2660
+ out.append("\n");
2661
+ out.append("}");
2662
+ }
2663
+ #endif
2664
+ #ifdef USE_BUTTON
2665
+ void ListEntitiesButtonResponse::dump_to(std::string &out) const {
2666
+ __attribute__((unused)) char buffer[64];
2667
+ out.append("ListEntitiesButtonResponse {\n");
2668
+ out.append(" object_id: ");
2669
+ out.append("'").append(this->object_id).append("'");
2670
+ out.append("\n");
2671
+
2672
+ out.append(" key: ");
2673
+ snprintf(buffer, sizeof(buffer), "%" PRIu32, this->key);
2674
+ out.append(buffer);
2675
+ out.append("\n");
2676
+
2677
+ out.append(" name: ");
2678
+ out.append("'").append(this->name).append("'");
2679
+ out.append("\n");
2680
+
2681
+ out.append(" unique_id: ");
2682
+ out.append("'").append(this->unique_id).append("'");
2683
+ out.append("\n");
2684
+
2685
+ out.append(" icon: ");
2686
+ out.append("'").append(this->icon).append("'");
2687
+ out.append("\n");
2688
+
2689
+ out.append(" disabled_by_default: ");
2690
+ out.append(YESNO(this->disabled_by_default));
2691
+ out.append("\n");
2692
+
2693
+ out.append(" entity_category: ");
2694
+ out.append(proto_enum_to_string<enums::EntityCategory>(this->entity_category));
2695
+ out.append("\n");
2696
+
2697
+ out.append(" device_class: ");
2698
+ out.append("'").append(this->device_class).append("'");
2699
+ out.append("\n");
2700
+
2701
+ out.append(" device_id: ");
2702
+ snprintf(buffer, sizeof(buffer), "%" PRIu32, this->device_id);
2703
+ out.append(buffer);
2704
+ out.append("\n");
2705
+ out.append("}");
2706
+ }
2707
+ void ButtonCommandRequest::dump_to(std::string &out) const {
2708
+ __attribute__((unused)) char buffer[64];
2709
+ out.append("ButtonCommandRequest {\n");
2710
+ out.append(" key: ");
2711
+ snprintf(buffer, sizeof(buffer), "%" PRIu32, this->key);
2712
+ out.append(buffer);
2713
+ out.append("\n");
2714
+ out.append("}");
2715
+ }
2716
+ #endif
2717
+ #ifdef USE_MEDIA_PLAYER
2718
+ void MediaPlayerSupportedFormat::dump_to(std::string &out) const {
2719
+ __attribute__((unused)) char buffer[64];
2720
+ out.append("MediaPlayerSupportedFormat {\n");
2721
+ out.append(" format: ");
2722
+ out.append("'").append(this->format).append("'");
2723
+ out.append("\n");
2724
+
2725
+ out.append(" sample_rate: ");
2726
+ snprintf(buffer, sizeof(buffer), "%" PRIu32, this->sample_rate);
2727
+ out.append(buffer);
2728
+ out.append("\n");
2729
+
2730
+ out.append(" num_channels: ");
2731
+ snprintf(buffer, sizeof(buffer), "%" PRIu32, this->num_channels);
2732
+ out.append(buffer);
2733
+ out.append("\n");
2734
+
2735
+ out.append(" purpose: ");
2736
+ out.append(proto_enum_to_string<enums::MediaPlayerFormatPurpose>(this->purpose));
2737
+ out.append("\n");
2738
+
2739
+ out.append(" sample_bytes: ");
2740
+ snprintf(buffer, sizeof(buffer), "%" PRIu32, this->sample_bytes);
2741
+ out.append(buffer);
2742
+ out.append("\n");
2743
+ out.append("}");
2744
+ }
2745
+ void ListEntitiesMediaPlayerResponse::dump_to(std::string &out) const {
2746
+ __attribute__((unused)) char buffer[64];
2747
+ out.append("ListEntitiesMediaPlayerResponse {\n");
2748
+ out.append(" object_id: ");
2749
+ out.append("'").append(this->object_id).append("'");
2750
+ out.append("\n");
2751
+
2752
+ out.append(" key: ");
2753
+ snprintf(buffer, sizeof(buffer), "%" PRIu32, this->key);
2754
+ out.append(buffer);
2755
+ out.append("\n");
2756
+
2757
+ out.append(" name: ");
2758
+ out.append("'").append(this->name).append("'");
2759
+ out.append("\n");
2760
+
2761
+ out.append(" unique_id: ");
2762
+ out.append("'").append(this->unique_id).append("'");
2763
+ out.append("\n");
2764
+
2765
+ out.append(" icon: ");
2766
+ out.append("'").append(this->icon).append("'");
2767
+ out.append("\n");
2768
+
2769
+ out.append(" disabled_by_default: ");
2770
+ out.append(YESNO(this->disabled_by_default));
2771
+ out.append("\n");
2772
+
2773
+ out.append(" entity_category: ");
2774
+ out.append(proto_enum_to_string<enums::EntityCategory>(this->entity_category));
2775
+ out.append("\n");
2776
+
2777
+ out.append(" supports_pause: ");
2778
+ out.append(YESNO(this->supports_pause));
2779
+ out.append("\n");
2780
+
2781
+ for (const auto &it : this->supported_formats) {
2782
+ out.append(" supported_formats: ");
2783
+ it.dump_to(out);
2784
+ out.append("\n");
2785
+ }
2786
+
2787
+ out.append(" device_id: ");
2788
+ snprintf(buffer, sizeof(buffer), "%" PRIu32, this->device_id);
2789
+ out.append(buffer);
2790
+ out.append("\n");
2791
+ out.append("}");
2792
+ }
2793
+ void MediaPlayerStateResponse::dump_to(std::string &out) const {
2794
+ __attribute__((unused)) char buffer[64];
2795
+ out.append("MediaPlayerStateResponse {\n");
2796
+ out.append(" key: ");
2797
+ snprintf(buffer, sizeof(buffer), "%" PRIu32, this->key);
2798
+ out.append(buffer);
2799
+ out.append("\n");
2800
+
2801
+ out.append(" state: ");
2802
+ out.append(proto_enum_to_string<enums::MediaPlayerState>(this->state));
2803
+ out.append("\n");
2804
+
2805
+ out.append(" volume: ");
2806
+ snprintf(buffer, sizeof(buffer), "%g", this->volume);
2807
+ out.append(buffer);
2808
+ out.append("\n");
2809
+
2810
+ out.append(" muted: ");
2811
+ out.append(YESNO(this->muted));
2812
+ out.append("\n");
2813
+
2814
+ out.append(" device_id: ");
2815
+ snprintf(buffer, sizeof(buffer), "%" PRIu32, this->device_id);
2816
+ out.append(buffer);
2817
+ out.append("\n");
2818
+ out.append("}");
2819
+ }
2820
+ void MediaPlayerCommandRequest::dump_to(std::string &out) const {
2821
+ __attribute__((unused)) char buffer[64];
2822
+ out.append("MediaPlayerCommandRequest {\n");
2823
+ out.append(" key: ");
2824
+ snprintf(buffer, sizeof(buffer), "%" PRIu32, this->key);
2825
+ out.append(buffer);
2826
+ out.append("\n");
2827
+
2828
+ out.append(" has_command: ");
2829
+ out.append(YESNO(this->has_command));
2830
+ out.append("\n");
2831
+
2832
+ out.append(" command: ");
2833
+ out.append(proto_enum_to_string<enums::MediaPlayerCommand>(this->command));
2834
+ out.append("\n");
2835
+
2836
+ out.append(" has_volume: ");
2837
+ out.append(YESNO(this->has_volume));
2838
+ out.append("\n");
2839
+
2840
+ out.append(" volume: ");
2841
+ snprintf(buffer, sizeof(buffer), "%g", this->volume);
2842
+ out.append(buffer);
2843
+ out.append("\n");
2844
+
2845
+ out.append(" has_media_url: ");
2846
+ out.append(YESNO(this->has_media_url));
2847
+ out.append("\n");
2848
+
2849
+ out.append(" media_url: ");
2850
+ out.append("'").append(this->media_url).append("'");
2851
+ out.append("\n");
2852
+
2853
+ out.append(" has_announcement: ");
2854
+ out.append(YESNO(this->has_announcement));
2855
+ out.append("\n");
2856
+
2857
+ out.append(" announcement: ");
2858
+ out.append(YESNO(this->announcement));
2859
+ out.append("\n");
2860
+ out.append("}");
2861
+ }
2862
+ #endif
2863
+ #ifdef USE_BLUETOOTH_PROXY
2864
+ void SubscribeBluetoothLEAdvertisementsRequest::dump_to(std::string &out) const {
2865
+ __attribute__((unused)) char buffer[64];
2866
+ out.append("SubscribeBluetoothLEAdvertisementsRequest {\n");
2867
+ out.append(" flags: ");
2868
+ snprintf(buffer, sizeof(buffer), "%" PRIu32, this->flags);
2869
+ out.append(buffer);
2870
+ out.append("\n");
2871
+ out.append("}");
2872
+ }
2873
+ void BluetoothServiceData::dump_to(std::string &out) const {
2874
+ __attribute__((unused)) char buffer[64];
2875
+ out.append("BluetoothServiceData {\n");
2876
+ out.append(" uuid: ");
2877
+ out.append("'").append(this->uuid).append("'");
2878
+ out.append("\n");
2879
+
2880
+ for (const auto &it : this->legacy_data) {
2881
+ out.append(" legacy_data: ");
2882
+ snprintf(buffer, sizeof(buffer), "%" PRIu32, it);
2883
+ out.append(buffer);
2884
+ out.append("\n");
2885
+ }
2886
+
2887
+ out.append(" data: ");
2888
+ out.append(format_hex_pretty(this->data));
2889
+ out.append("\n");
2890
+ out.append("}");
2891
+ }
2892
+ void BluetoothLEAdvertisementResponse::dump_to(std::string &out) const {
2893
+ __attribute__((unused)) char buffer[64];
2894
+ out.append("BluetoothLEAdvertisementResponse {\n");
2895
+ out.append(" address: ");
2896
+ snprintf(buffer, sizeof(buffer), "%llu", this->address);
2897
+ out.append(buffer);
2898
+ out.append("\n");
2899
+
2900
+ out.append(" name: ");
2901
+ out.append(format_hex_pretty(this->name));
2902
+ out.append("\n");
2903
+
2904
+ out.append(" rssi: ");
2905
+ snprintf(buffer, sizeof(buffer), "%" PRId32, this->rssi);
2906
+ out.append(buffer);
2907
+ out.append("\n");
2908
+
2909
+ for (const auto &it : this->service_uuids) {
2910
+ out.append(" service_uuids: ");
2911
+ out.append("'").append(it).append("'");
2912
+ out.append("\n");
2913
+ }
2914
+
2915
+ for (const auto &it : this->service_data) {
2916
+ out.append(" service_data: ");
2917
+ it.dump_to(out);
2918
+ out.append("\n");
2919
+ }
2920
+
2921
+ for (const auto &it : this->manufacturer_data) {
2922
+ out.append(" manufacturer_data: ");
2923
+ it.dump_to(out);
2924
+ out.append("\n");
2925
+ }
2926
+
2927
+ out.append(" address_type: ");
2928
+ snprintf(buffer, sizeof(buffer), "%" PRIu32, this->address_type);
2929
+ out.append(buffer);
2930
+ out.append("\n");
2931
+ out.append("}");
2932
+ }
2933
+ void BluetoothLERawAdvertisement::dump_to(std::string &out) const {
2934
+ __attribute__((unused)) char buffer[64];
2935
+ out.append("BluetoothLERawAdvertisement {\n");
2936
+ out.append(" address: ");
2937
+ snprintf(buffer, sizeof(buffer), "%llu", this->address);
2938
+ out.append(buffer);
2939
+ out.append("\n");
2940
+
2941
+ out.append(" rssi: ");
2942
+ snprintf(buffer, sizeof(buffer), "%" PRId32, this->rssi);
2943
+ out.append(buffer);
2944
+ out.append("\n");
2945
+
2946
+ out.append(" address_type: ");
2947
+ snprintf(buffer, sizeof(buffer), "%" PRIu32, this->address_type);
2948
+ out.append(buffer);
2949
+ out.append("\n");
2950
+
2951
+ out.append(" data: ");
2952
+ out.append(format_hex_pretty(this->data));
2953
+ out.append("\n");
2954
+ out.append("}");
2955
+ }
2956
+ void BluetoothLERawAdvertisementsResponse::dump_to(std::string &out) const {
2957
+ __attribute__((unused)) char buffer[64];
2958
+ out.append("BluetoothLERawAdvertisementsResponse {\n");
2959
+ for (const auto &it : this->advertisements) {
2960
+ out.append(" advertisements: ");
2961
+ it.dump_to(out);
2962
+ out.append("\n");
2963
+ }
2964
+ out.append("}");
2965
+ }
2966
+ void BluetoothDeviceRequest::dump_to(std::string &out) const {
2967
+ __attribute__((unused)) char buffer[64];
2968
+ out.append("BluetoothDeviceRequest {\n");
2969
+ out.append(" address: ");
2970
+ snprintf(buffer, sizeof(buffer), "%llu", this->address);
2971
+ out.append(buffer);
2972
+ out.append("\n");
2973
+
2974
+ out.append(" request_type: ");
2975
+ out.append(proto_enum_to_string<enums::BluetoothDeviceRequestType>(this->request_type));
2976
+ out.append("\n");
2977
+
2978
+ out.append(" has_address_type: ");
2979
+ out.append(YESNO(this->has_address_type));
2980
+ out.append("\n");
2981
+
2982
+ out.append(" address_type: ");
2983
+ snprintf(buffer, sizeof(buffer), "%" PRIu32, this->address_type);
2984
+ out.append(buffer);
2985
+ out.append("\n");
2986
+ out.append("}");
2987
+ }
2988
+ void BluetoothDeviceConnectionResponse::dump_to(std::string &out) const {
2989
+ __attribute__((unused)) char buffer[64];
2990
+ out.append("BluetoothDeviceConnectionResponse {\n");
2991
+ out.append(" address: ");
2992
+ snprintf(buffer, sizeof(buffer), "%llu", this->address);
2993
+ out.append(buffer);
2994
+ out.append("\n");
2995
+
2996
+ out.append(" connected: ");
2997
+ out.append(YESNO(this->connected));
2998
+ out.append("\n");
2999
+
3000
+ out.append(" mtu: ");
3001
+ snprintf(buffer, sizeof(buffer), "%" PRIu32, this->mtu);
3002
+ out.append(buffer);
3003
+ out.append("\n");
3004
+
3005
+ out.append(" error: ");
3006
+ snprintf(buffer, sizeof(buffer), "%" PRId32, this->error);
3007
+ out.append(buffer);
3008
+ out.append("\n");
3009
+ out.append("}");
3010
+ }
3011
+ void BluetoothGATTGetServicesRequest::dump_to(std::string &out) const {
3012
+ __attribute__((unused)) char buffer[64];
3013
+ out.append("BluetoothGATTGetServicesRequest {\n");
3014
+ out.append(" address: ");
3015
+ snprintf(buffer, sizeof(buffer), "%llu", this->address);
3016
+ out.append(buffer);
3017
+ out.append("\n");
3018
+ out.append("}");
3019
+ }
3020
+ void BluetoothGATTDescriptor::dump_to(std::string &out) const {
3021
+ __attribute__((unused)) char buffer[64];
3022
+ out.append("BluetoothGATTDescriptor {\n");
3023
+ for (const auto &it : this->uuid) {
3024
+ out.append(" uuid: ");
3025
+ snprintf(buffer, sizeof(buffer), "%llu", it);
3026
+ out.append(buffer);
3027
+ out.append("\n");
3028
+ }
3029
+
3030
+ out.append(" handle: ");
3031
+ snprintf(buffer, sizeof(buffer), "%" PRIu32, this->handle);
3032
+ out.append(buffer);
3033
+ out.append("\n");
3034
+ out.append("}");
3035
+ }
3036
+ void BluetoothGATTCharacteristic::dump_to(std::string &out) const {
3037
+ __attribute__((unused)) char buffer[64];
3038
+ out.append("BluetoothGATTCharacteristic {\n");
3039
+ for (const auto &it : this->uuid) {
3040
+ out.append(" uuid: ");
3041
+ snprintf(buffer, sizeof(buffer), "%llu", it);
3042
+ out.append(buffer);
3043
+ out.append("\n");
3044
+ }
3045
+
3046
+ out.append(" handle: ");
3047
+ snprintf(buffer, sizeof(buffer), "%" PRIu32, this->handle);
3048
+ out.append(buffer);
3049
+ out.append("\n");
3050
+
3051
+ out.append(" properties: ");
3052
+ snprintf(buffer, sizeof(buffer), "%" PRIu32, this->properties);
3053
+ out.append(buffer);
3054
+ out.append("\n");
3055
+
3056
+ for (const auto &it : this->descriptors) {
3057
+ out.append(" descriptors: ");
3058
+ it.dump_to(out);
3059
+ out.append("\n");
3060
+ }
3061
+ out.append("}");
3062
+ }
3063
+ void BluetoothGATTService::dump_to(std::string &out) const {
3064
+ __attribute__((unused)) char buffer[64];
3065
+ out.append("BluetoothGATTService {\n");
3066
+ for (const auto &it : this->uuid) {
3067
+ out.append(" uuid: ");
3068
+ snprintf(buffer, sizeof(buffer), "%llu", it);
3069
+ out.append(buffer);
3070
+ out.append("\n");
3071
+ }
3072
+
3073
+ out.append(" handle: ");
3074
+ snprintf(buffer, sizeof(buffer), "%" PRIu32, this->handle);
3075
+ out.append(buffer);
3076
+ out.append("\n");
3077
+
3078
+ for (const auto &it : this->characteristics) {
3079
+ out.append(" characteristics: ");
3080
+ it.dump_to(out);
3081
+ out.append("\n");
3082
+ }
3083
+ out.append("}");
3084
+ }
3085
+ void BluetoothGATTGetServicesResponse::dump_to(std::string &out) const {
3086
+ __attribute__((unused)) char buffer[64];
3087
+ out.append("BluetoothGATTGetServicesResponse {\n");
3088
+ out.append(" address: ");
3089
+ snprintf(buffer, sizeof(buffer), "%llu", this->address);
3090
+ out.append(buffer);
3091
+ out.append("\n");
3092
+
3093
+ for (const auto &it : this->services) {
3094
+ out.append(" services: ");
3095
+ it.dump_to(out);
3096
+ out.append("\n");
3097
+ }
3098
+ out.append("}");
3099
+ }
3100
+ void BluetoothGATTGetServicesDoneResponse::dump_to(std::string &out) const {
3101
+ __attribute__((unused)) char buffer[64];
3102
+ out.append("BluetoothGATTGetServicesDoneResponse {\n");
3103
+ out.append(" address: ");
3104
+ snprintf(buffer, sizeof(buffer), "%llu", this->address);
3105
+ out.append(buffer);
3106
+ out.append("\n");
3107
+ out.append("}");
3108
+ }
3109
+ void BluetoothGATTReadRequest::dump_to(std::string &out) const {
3110
+ __attribute__((unused)) char buffer[64];
3111
+ out.append("BluetoothGATTReadRequest {\n");
3112
+ out.append(" address: ");
3113
+ snprintf(buffer, sizeof(buffer), "%llu", this->address);
3114
+ out.append(buffer);
3115
+ out.append("\n");
3116
+
3117
+ out.append(" handle: ");
3118
+ snprintf(buffer, sizeof(buffer), "%" PRIu32, this->handle);
3119
+ out.append(buffer);
3120
+ out.append("\n");
3121
+ out.append("}");
3122
+ }
3123
+ void BluetoothGATTReadResponse::dump_to(std::string &out) const {
3124
+ __attribute__((unused)) char buffer[64];
3125
+ out.append("BluetoothGATTReadResponse {\n");
3126
+ out.append(" address: ");
3127
+ snprintf(buffer, sizeof(buffer), "%llu", this->address);
3128
+ out.append(buffer);
3129
+ out.append("\n");
3130
+
3131
+ out.append(" handle: ");
3132
+ snprintf(buffer, sizeof(buffer), "%" PRIu32, this->handle);
3133
+ out.append(buffer);
3134
+ out.append("\n");
3135
+
3136
+ out.append(" data: ");
3137
+ out.append(format_hex_pretty(this->data));
3138
+ out.append("\n");
3139
+ out.append("}");
3140
+ }
3141
+ void BluetoothGATTWriteRequest::dump_to(std::string &out) const {
3142
+ __attribute__((unused)) char buffer[64];
3143
+ out.append("BluetoothGATTWriteRequest {\n");
3144
+ out.append(" address: ");
3145
+ snprintf(buffer, sizeof(buffer), "%llu", this->address);
3146
+ out.append(buffer);
3147
+ out.append("\n");
3148
+
3149
+ out.append(" handle: ");
3150
+ snprintf(buffer, sizeof(buffer), "%" PRIu32, this->handle);
3151
+ out.append(buffer);
3152
+ out.append("\n");
3153
+
3154
+ out.append(" response: ");
3155
+ out.append(YESNO(this->response));
3156
+ out.append("\n");
3157
+
3158
+ out.append(" data: ");
3159
+ out.append(format_hex_pretty(this->data));
3160
+ out.append("\n");
3161
+ out.append("}");
3162
+ }
3163
+ void BluetoothGATTReadDescriptorRequest::dump_to(std::string &out) const {
3164
+ __attribute__((unused)) char buffer[64];
3165
+ out.append("BluetoothGATTReadDescriptorRequest {\n");
3166
+ out.append(" address: ");
3167
+ snprintf(buffer, sizeof(buffer), "%llu", this->address);
3168
+ out.append(buffer);
3169
+ out.append("\n");
3170
+
3171
+ out.append(" handle: ");
3172
+ snprintf(buffer, sizeof(buffer), "%" PRIu32, this->handle);
3173
+ out.append(buffer);
3174
+ out.append("\n");
3175
+ out.append("}");
3176
+ }
3177
+ void BluetoothGATTWriteDescriptorRequest::dump_to(std::string &out) const {
3178
+ __attribute__((unused)) char buffer[64];
3179
+ out.append("BluetoothGATTWriteDescriptorRequest {\n");
3180
+ out.append(" address: ");
3181
+ snprintf(buffer, sizeof(buffer), "%llu", this->address);
3182
+ out.append(buffer);
3183
+ out.append("\n");
3184
+
3185
+ out.append(" handle: ");
3186
+ snprintf(buffer, sizeof(buffer), "%" PRIu32, this->handle);
3187
+ out.append(buffer);
3188
+ out.append("\n");
3189
+
3190
+ out.append(" data: ");
3191
+ out.append(format_hex_pretty(this->data));
3192
+ out.append("\n");
3193
+ out.append("}");
3194
+ }
3195
+ void BluetoothGATTNotifyRequest::dump_to(std::string &out) const {
3196
+ __attribute__((unused)) char buffer[64];
3197
+ out.append("BluetoothGATTNotifyRequest {\n");
3198
+ out.append(" address: ");
3199
+ snprintf(buffer, sizeof(buffer), "%llu", this->address);
3200
+ out.append(buffer);
3201
+ out.append("\n");
3202
+
3203
+ out.append(" handle: ");
3204
+ snprintf(buffer, sizeof(buffer), "%" PRIu32, this->handle);
3205
+ out.append(buffer);
3206
+ out.append("\n");
3207
+
3208
+ out.append(" enable: ");
3209
+ out.append(YESNO(this->enable));
3210
+ out.append("\n");
3211
+ out.append("}");
3212
+ }
3213
+ void BluetoothGATTNotifyDataResponse::dump_to(std::string &out) const {
3214
+ __attribute__((unused)) char buffer[64];
3215
+ out.append("BluetoothGATTNotifyDataResponse {\n");
3216
+ out.append(" address: ");
3217
+ snprintf(buffer, sizeof(buffer), "%llu", this->address);
3218
+ out.append(buffer);
3219
+ out.append("\n");
3220
+
3221
+ out.append(" handle: ");
3222
+ snprintf(buffer, sizeof(buffer), "%" PRIu32, this->handle);
3223
+ out.append(buffer);
3224
+ out.append("\n");
3225
+
3226
+ out.append(" data: ");
3227
+ out.append(format_hex_pretty(this->data));
3228
+ out.append("\n");
3229
+ out.append("}");
3230
+ }
3231
+ void SubscribeBluetoothConnectionsFreeRequest::dump_to(std::string &out) const {
3232
+ out.append("SubscribeBluetoothConnectionsFreeRequest {}");
3233
+ }
3234
+ void BluetoothConnectionsFreeResponse::dump_to(std::string &out) const {
3235
+ __attribute__((unused)) char buffer[64];
3236
+ out.append("BluetoothConnectionsFreeResponse {\n");
3237
+ out.append(" free: ");
3238
+ snprintf(buffer, sizeof(buffer), "%" PRIu32, this->free);
3239
+ out.append(buffer);
3240
+ out.append("\n");
3241
+
3242
+ out.append(" limit: ");
3243
+ snprintf(buffer, sizeof(buffer), "%" PRIu32, this->limit);
3244
+ out.append(buffer);
3245
+ out.append("\n");
3246
+
3247
+ for (const auto &it : this->allocated) {
3248
+ out.append(" allocated: ");
3249
+ snprintf(buffer, sizeof(buffer), "%llu", it);
3250
+ out.append(buffer);
3251
+ out.append("\n");
3252
+ }
3253
+ out.append("}");
3254
+ }
3255
+ void BluetoothGATTErrorResponse::dump_to(std::string &out) const {
3256
+ __attribute__((unused)) char buffer[64];
3257
+ out.append("BluetoothGATTErrorResponse {\n");
3258
+ out.append(" address: ");
3259
+ snprintf(buffer, sizeof(buffer), "%llu", this->address);
3260
+ out.append(buffer);
3261
+ out.append("\n");
3262
+
3263
+ out.append(" handle: ");
3264
+ snprintf(buffer, sizeof(buffer), "%" PRIu32, this->handle);
3265
+ out.append(buffer);
3266
+ out.append("\n");
3267
+
3268
+ out.append(" error: ");
3269
+ snprintf(buffer, sizeof(buffer), "%" PRId32, this->error);
3270
+ out.append(buffer);
3271
+ out.append("\n");
3272
+ out.append("}");
3273
+ }
3274
+ void BluetoothGATTWriteResponse::dump_to(std::string &out) const {
3275
+ __attribute__((unused)) char buffer[64];
3276
+ out.append("BluetoothGATTWriteResponse {\n");
3277
+ out.append(" address: ");
3278
+ snprintf(buffer, sizeof(buffer), "%llu", this->address);
3279
+ out.append(buffer);
3280
+ out.append("\n");
3281
+
3282
+ out.append(" handle: ");
3283
+ snprintf(buffer, sizeof(buffer), "%" PRIu32, this->handle);
3284
+ out.append(buffer);
3285
+ out.append("\n");
3286
+ out.append("}");
3287
+ }
3288
+ void BluetoothGATTNotifyResponse::dump_to(std::string &out) const {
3289
+ __attribute__((unused)) char buffer[64];
3290
+ out.append("BluetoothGATTNotifyResponse {\n");
3291
+ out.append(" address: ");
3292
+ snprintf(buffer, sizeof(buffer), "%llu", this->address);
3293
+ out.append(buffer);
3294
+ out.append("\n");
3295
+
3296
+ out.append(" handle: ");
3297
+ snprintf(buffer, sizeof(buffer), "%" PRIu32, this->handle);
3298
+ out.append(buffer);
3299
+ out.append("\n");
3300
+ out.append("}");
3301
+ }
3302
+ void BluetoothDevicePairingResponse::dump_to(std::string &out) const {
3303
+ __attribute__((unused)) char buffer[64];
3304
+ out.append("BluetoothDevicePairingResponse {\n");
3305
+ out.append(" address: ");
3306
+ snprintf(buffer, sizeof(buffer), "%llu", this->address);
3307
+ out.append(buffer);
3308
+ out.append("\n");
3309
+
3310
+ out.append(" paired: ");
3311
+ out.append(YESNO(this->paired));
3312
+ out.append("\n");
3313
+
3314
+ out.append(" error: ");
3315
+ snprintf(buffer, sizeof(buffer), "%" PRId32, this->error);
3316
+ out.append(buffer);
3317
+ out.append("\n");
3318
+ out.append("}");
3319
+ }
3320
+ void BluetoothDeviceUnpairingResponse::dump_to(std::string &out) const {
3321
+ __attribute__((unused)) char buffer[64];
3322
+ out.append("BluetoothDeviceUnpairingResponse {\n");
3323
+ out.append(" address: ");
3324
+ snprintf(buffer, sizeof(buffer), "%llu", this->address);
3325
+ out.append(buffer);
3326
+ out.append("\n");
3327
+
3328
+ out.append(" success: ");
3329
+ out.append(YESNO(this->success));
3330
+ out.append("\n");
3331
+
3332
+ out.append(" error: ");
3333
+ snprintf(buffer, sizeof(buffer), "%" PRId32, this->error);
3334
+ out.append(buffer);
3335
+ out.append("\n");
3336
+ out.append("}");
3337
+ }
3338
+ void UnsubscribeBluetoothLEAdvertisementsRequest::dump_to(std::string &out) const {
3339
+ out.append("UnsubscribeBluetoothLEAdvertisementsRequest {}");
3340
+ }
3341
+ void BluetoothDeviceClearCacheResponse::dump_to(std::string &out) const {
3342
+ __attribute__((unused)) char buffer[64];
3343
+ out.append("BluetoothDeviceClearCacheResponse {\n");
3344
+ out.append(" address: ");
3345
+ snprintf(buffer, sizeof(buffer), "%llu", this->address);
3346
+ out.append(buffer);
3347
+ out.append("\n");
3348
+
3349
+ out.append(" success: ");
3350
+ out.append(YESNO(this->success));
3351
+ out.append("\n");
3352
+
3353
+ out.append(" error: ");
3354
+ snprintf(buffer, sizeof(buffer), "%" PRId32, this->error);
3355
+ out.append(buffer);
3356
+ out.append("\n");
3357
+ out.append("}");
3358
+ }
3359
+ void BluetoothScannerStateResponse::dump_to(std::string &out) const {
3360
+ __attribute__((unused)) char buffer[64];
3361
+ out.append("BluetoothScannerStateResponse {\n");
3362
+ out.append(" state: ");
3363
+ out.append(proto_enum_to_string<enums::BluetoothScannerState>(this->state));
3364
+ out.append("\n");
3365
+
3366
+ out.append(" mode: ");
3367
+ out.append(proto_enum_to_string<enums::BluetoothScannerMode>(this->mode));
3368
+ out.append("\n");
3369
+ out.append("}");
3370
+ }
3371
+ void BluetoothScannerSetModeRequest::dump_to(std::string &out) const {
3372
+ __attribute__((unused)) char buffer[64];
3373
+ out.append("BluetoothScannerSetModeRequest {\n");
3374
+ out.append(" mode: ");
3375
+ out.append(proto_enum_to_string<enums::BluetoothScannerMode>(this->mode));
3376
+ out.append("\n");
3377
+ out.append("}");
3378
+ }
3379
+ #endif
3380
+ #ifdef USE_VOICE_ASSISTANT
3381
+ void SubscribeVoiceAssistantRequest::dump_to(std::string &out) const {
3382
+ __attribute__((unused)) char buffer[64];
3383
+ out.append("SubscribeVoiceAssistantRequest {\n");
3384
+ out.append(" subscribe: ");
3385
+ out.append(YESNO(this->subscribe));
3386
+ out.append("\n");
3387
+
3388
+ out.append(" flags: ");
3389
+ snprintf(buffer, sizeof(buffer), "%" PRIu32, this->flags);
3390
+ out.append(buffer);
3391
+ out.append("\n");
3392
+ out.append("}");
3393
+ }
3394
+ void VoiceAssistantAudioSettings::dump_to(std::string &out) const {
3395
+ __attribute__((unused)) char buffer[64];
3396
+ out.append("VoiceAssistantAudioSettings {\n");
3397
+ out.append(" noise_suppression_level: ");
3398
+ snprintf(buffer, sizeof(buffer), "%" PRIu32, this->noise_suppression_level);
3399
+ out.append(buffer);
3400
+ out.append("\n");
3401
+
3402
+ out.append(" auto_gain: ");
3403
+ snprintf(buffer, sizeof(buffer), "%" PRIu32, this->auto_gain);
3404
+ out.append(buffer);
3405
+ out.append("\n");
3406
+
3407
+ out.append(" volume_multiplier: ");
3408
+ snprintf(buffer, sizeof(buffer), "%g", this->volume_multiplier);
3409
+ out.append(buffer);
3410
+ out.append("\n");
3411
+ out.append("}");
3412
+ }
3413
+ void VoiceAssistantRequest::dump_to(std::string &out) const {
3414
+ __attribute__((unused)) char buffer[64];
3415
+ out.append("VoiceAssistantRequest {\n");
3416
+ out.append(" start: ");
3417
+ out.append(YESNO(this->start));
3418
+ out.append("\n");
3419
+
3420
+ out.append(" conversation_id: ");
3421
+ out.append("'").append(this->conversation_id).append("'");
3422
+ out.append("\n");
3423
+
3424
+ out.append(" flags: ");
3425
+ snprintf(buffer, sizeof(buffer), "%" PRIu32, this->flags);
3426
+ out.append(buffer);
3427
+ out.append("\n");
3428
+
3429
+ out.append(" audio_settings: ");
3430
+ this->audio_settings.dump_to(out);
3431
+ out.append("\n");
3432
+
3433
+ out.append(" wake_word_phrase: ");
3434
+ out.append("'").append(this->wake_word_phrase).append("'");
3435
+ out.append("\n");
3436
+ out.append("}");
3437
+ }
3438
+ void VoiceAssistantResponse::dump_to(std::string &out) const {
3439
+ __attribute__((unused)) char buffer[64];
3440
+ out.append("VoiceAssistantResponse {\n");
3441
+ out.append(" port: ");
3442
+ snprintf(buffer, sizeof(buffer), "%" PRIu32, this->port);
3443
+ out.append(buffer);
3444
+ out.append("\n");
3445
+
3446
+ out.append(" error: ");
3447
+ out.append(YESNO(this->error));
3448
+ out.append("\n");
3449
+ out.append("}");
3450
+ }
3451
+ void VoiceAssistantEventData::dump_to(std::string &out) const {
3452
+ __attribute__((unused)) char buffer[64];
3453
+ out.append("VoiceAssistantEventData {\n");
3454
+ out.append(" name: ");
3455
+ out.append("'").append(this->name).append("'");
3456
+ out.append("\n");
3457
+
3458
+ out.append(" value: ");
3459
+ out.append("'").append(this->value).append("'");
3460
+ out.append("\n");
3461
+ out.append("}");
3462
+ }
3463
+ void VoiceAssistantEventResponse::dump_to(std::string &out) const {
3464
+ __attribute__((unused)) char buffer[64];
3465
+ out.append("VoiceAssistantEventResponse {\n");
3466
+ out.append(" event_type: ");
3467
+ out.append(proto_enum_to_string<enums::VoiceAssistantEvent>(this->event_type));
3468
+ out.append("\n");
3469
+
3470
+ for (const auto &it : this->data) {
3471
+ out.append(" data: ");
3472
+ it.dump_to(out);
3473
+ out.append("\n");
3474
+ }
3475
+ out.append("}");
3476
+ }
3477
+ void VoiceAssistantAudio::dump_to(std::string &out) const {
3478
+ __attribute__((unused)) char buffer[64];
3479
+ out.append("VoiceAssistantAudio {\n");
3480
+ out.append(" data: ");
3481
+ out.append(format_hex_pretty(this->data));
3482
+ out.append("\n");
3483
+
3484
+ out.append(" end: ");
3485
+ out.append(YESNO(this->end));
3486
+ out.append("\n");
3487
+ out.append("}");
3488
+ }
3489
+ void VoiceAssistantTimerEventResponse::dump_to(std::string &out) const {
3490
+ __attribute__((unused)) char buffer[64];
3491
+ out.append("VoiceAssistantTimerEventResponse {\n");
3492
+ out.append(" event_type: ");
3493
+ out.append(proto_enum_to_string<enums::VoiceAssistantTimerEvent>(this->event_type));
3494
+ out.append("\n");
3495
+
3496
+ out.append(" timer_id: ");
3497
+ out.append("'").append(this->timer_id).append("'");
3498
+ out.append("\n");
3499
+
3500
+ out.append(" name: ");
3501
+ out.append("'").append(this->name).append("'");
3502
+ out.append("\n");
3503
+
3504
+ out.append(" total_seconds: ");
3505
+ snprintf(buffer, sizeof(buffer), "%" PRIu32, this->total_seconds);
3506
+ out.append(buffer);
3507
+ out.append("\n");
3508
+
3509
+ out.append(" seconds_left: ");
3510
+ snprintf(buffer, sizeof(buffer), "%" PRIu32, this->seconds_left);
3511
+ out.append(buffer);
3512
+ out.append("\n");
3513
+
3514
+ out.append(" is_active: ");
3515
+ out.append(YESNO(this->is_active));
3516
+ out.append("\n");
3517
+ out.append("}");
3518
+ }
3519
+ void VoiceAssistantAnnounceRequest::dump_to(std::string &out) const {
3520
+ __attribute__((unused)) char buffer[64];
3521
+ out.append("VoiceAssistantAnnounceRequest {\n");
3522
+ out.append(" media_id: ");
3523
+ out.append("'").append(this->media_id).append("'");
3524
+ out.append("\n");
3525
+
3526
+ out.append(" text: ");
3527
+ out.append("'").append(this->text).append("'");
3528
+ out.append("\n");
3529
+
3530
+ out.append(" preannounce_media_id: ");
3531
+ out.append("'").append(this->preannounce_media_id).append("'");
3532
+ out.append("\n");
3533
+
3534
+ out.append(" start_conversation: ");
3535
+ out.append(YESNO(this->start_conversation));
3536
+ out.append("\n");
3537
+ out.append("}");
3538
+ }
3539
+ void VoiceAssistantAnnounceFinished::dump_to(std::string &out) const {
3540
+ __attribute__((unused)) char buffer[64];
3541
+ out.append("VoiceAssistantAnnounceFinished {\n");
3542
+ out.append(" success: ");
3543
+ out.append(YESNO(this->success));
3544
+ out.append("\n");
3545
+ out.append("}");
3546
+ }
3547
+ void VoiceAssistantWakeWord::dump_to(std::string &out) const {
3548
+ __attribute__((unused)) char buffer[64];
3549
+ out.append("VoiceAssistantWakeWord {\n");
3550
+ out.append(" id: ");
3551
+ out.append("'").append(this->id).append("'");
3552
+ out.append("\n");
3553
+
3554
+ out.append(" wake_word: ");
3555
+ out.append("'").append(this->wake_word).append("'");
3556
+ out.append("\n");
3557
+
3558
+ for (const auto &it : this->trained_languages) {
3559
+ out.append(" trained_languages: ");
3560
+ out.append("'").append(it).append("'");
3561
+ out.append("\n");
3562
+ }
3563
+ out.append("}");
3564
+ }
3565
+ void VoiceAssistantConfigurationRequest::dump_to(std::string &out) const {
3566
+ out.append("VoiceAssistantConfigurationRequest {}");
3567
+ }
3568
+ void VoiceAssistantConfigurationResponse::dump_to(std::string &out) const {
3569
+ __attribute__((unused)) char buffer[64];
3570
+ out.append("VoiceAssistantConfigurationResponse {\n");
3571
+ for (const auto &it : this->available_wake_words) {
3572
+ out.append(" available_wake_words: ");
3573
+ it.dump_to(out);
3574
+ out.append("\n");
3575
+ }
3576
+
3577
+ for (const auto &it : this->active_wake_words) {
3578
+ out.append(" active_wake_words: ");
3579
+ out.append("'").append(it).append("'");
3580
+ out.append("\n");
3581
+ }
3582
+
3583
+ out.append(" max_active_wake_words: ");
3584
+ snprintf(buffer, sizeof(buffer), "%" PRIu32, this->max_active_wake_words);
3585
+ out.append(buffer);
3586
+ out.append("\n");
3587
+ out.append("}");
3588
+ }
3589
+ void VoiceAssistantSetConfiguration::dump_to(std::string &out) const {
3590
+ __attribute__((unused)) char buffer[64];
3591
+ out.append("VoiceAssistantSetConfiguration {\n");
3592
+ for (const auto &it : this->active_wake_words) {
3593
+ out.append(" active_wake_words: ");
3594
+ out.append("'").append(it).append("'");
3595
+ out.append("\n");
3596
+ }
3597
+ out.append("}");
3598
+ }
3599
+ #endif
3600
+ #ifdef USE_ALARM_CONTROL_PANEL
3601
+ void ListEntitiesAlarmControlPanelResponse::dump_to(std::string &out) const {
3602
+ __attribute__((unused)) char buffer[64];
3603
+ out.append("ListEntitiesAlarmControlPanelResponse {\n");
3604
+ out.append(" object_id: ");
3605
+ out.append("'").append(this->object_id).append("'");
3606
+ out.append("\n");
3607
+
3608
+ out.append(" key: ");
3609
+ snprintf(buffer, sizeof(buffer), "%" PRIu32, this->key);
3610
+ out.append(buffer);
3611
+ out.append("\n");
3612
+
3613
+ out.append(" name: ");
3614
+ out.append("'").append(this->name).append("'");
3615
+ out.append("\n");
3616
+
3617
+ out.append(" unique_id: ");
3618
+ out.append("'").append(this->unique_id).append("'");
3619
+ out.append("\n");
3620
+
3621
+ out.append(" icon: ");
3622
+ out.append("'").append(this->icon).append("'");
3623
+ out.append("\n");
3624
+
3625
+ out.append(" disabled_by_default: ");
3626
+ out.append(YESNO(this->disabled_by_default));
3627
+ out.append("\n");
3628
+
3629
+ out.append(" entity_category: ");
3630
+ out.append(proto_enum_to_string<enums::EntityCategory>(this->entity_category));
3631
+ out.append("\n");
3632
+
3633
+ out.append(" supported_features: ");
3634
+ snprintf(buffer, sizeof(buffer), "%" PRIu32, this->supported_features);
3635
+ out.append(buffer);
3636
+ out.append("\n");
3637
+
3638
+ out.append(" requires_code: ");
3639
+ out.append(YESNO(this->requires_code));
3640
+ out.append("\n");
3641
+
3642
+ out.append(" requires_code_to_arm: ");
3643
+ out.append(YESNO(this->requires_code_to_arm));
3644
+ out.append("\n");
3645
+
3646
+ out.append(" device_id: ");
3647
+ snprintf(buffer, sizeof(buffer), "%" PRIu32, this->device_id);
3648
+ out.append(buffer);
3649
+ out.append("\n");
3650
+ out.append("}");
3651
+ }
3652
+ void AlarmControlPanelStateResponse::dump_to(std::string &out) const {
3653
+ __attribute__((unused)) char buffer[64];
3654
+ out.append("AlarmControlPanelStateResponse {\n");
3655
+ out.append(" key: ");
3656
+ snprintf(buffer, sizeof(buffer), "%" PRIu32, this->key);
3657
+ out.append(buffer);
3658
+ out.append("\n");
3659
+
3660
+ out.append(" state: ");
3661
+ out.append(proto_enum_to_string<enums::AlarmControlPanelState>(this->state));
3662
+ out.append("\n");
3663
+
3664
+ out.append(" device_id: ");
3665
+ snprintf(buffer, sizeof(buffer), "%" PRIu32, this->device_id);
3666
+ out.append(buffer);
3667
+ out.append("\n");
3668
+ out.append("}");
3669
+ }
3670
+ void AlarmControlPanelCommandRequest::dump_to(std::string &out) const {
3671
+ __attribute__((unused)) char buffer[64];
3672
+ out.append("AlarmControlPanelCommandRequest {\n");
3673
+ out.append(" key: ");
3674
+ snprintf(buffer, sizeof(buffer), "%" PRIu32, this->key);
3675
+ out.append(buffer);
3676
+ out.append("\n");
3677
+
3678
+ out.append(" command: ");
3679
+ out.append(proto_enum_to_string<enums::AlarmControlPanelStateCommand>(this->command));
3680
+ out.append("\n");
3681
+
3682
+ out.append(" code: ");
3683
+ out.append("'").append(this->code).append("'");
3684
+ out.append("\n");
3685
+ out.append("}");
3686
+ }
3687
+ #endif
3688
+ #ifdef USE_TEXT
3689
+ void ListEntitiesTextResponse::dump_to(std::string &out) const {
3690
+ __attribute__((unused)) char buffer[64];
3691
+ out.append("ListEntitiesTextResponse {\n");
3692
+ out.append(" object_id: ");
3693
+ out.append("'").append(this->object_id).append("'");
3694
+ out.append("\n");
3695
+
3696
+ out.append(" key: ");
3697
+ snprintf(buffer, sizeof(buffer), "%" PRIu32, this->key);
3698
+ out.append(buffer);
3699
+ out.append("\n");
3700
+
3701
+ out.append(" name: ");
3702
+ out.append("'").append(this->name).append("'");
3703
+ out.append("\n");
3704
+
3705
+ out.append(" unique_id: ");
3706
+ out.append("'").append(this->unique_id).append("'");
3707
+ out.append("\n");
3708
+
3709
+ out.append(" icon: ");
3710
+ out.append("'").append(this->icon).append("'");
3711
+ out.append("\n");
3712
+
3713
+ out.append(" disabled_by_default: ");
3714
+ out.append(YESNO(this->disabled_by_default));
3715
+ out.append("\n");
3716
+
3717
+ out.append(" entity_category: ");
3718
+ out.append(proto_enum_to_string<enums::EntityCategory>(this->entity_category));
3719
+ out.append("\n");
3720
+
3721
+ out.append(" min_length: ");
3722
+ snprintf(buffer, sizeof(buffer), "%" PRIu32, this->min_length);
3723
+ out.append(buffer);
3724
+ out.append("\n");
3725
+
3726
+ out.append(" max_length: ");
3727
+ snprintf(buffer, sizeof(buffer), "%" PRIu32, this->max_length);
3728
+ out.append(buffer);
3729
+ out.append("\n");
3730
+
3731
+ out.append(" pattern: ");
3732
+ out.append("'").append(this->pattern).append("'");
3733
+ out.append("\n");
3734
+
3735
+ out.append(" mode: ");
3736
+ out.append(proto_enum_to_string<enums::TextMode>(this->mode));
3737
+ out.append("\n");
3738
+
3739
+ out.append(" device_id: ");
3740
+ snprintf(buffer, sizeof(buffer), "%" PRIu32, this->device_id);
3741
+ out.append(buffer);
3742
+ out.append("\n");
3743
+ out.append("}");
3744
+ }
3745
+ void TextStateResponse::dump_to(std::string &out) const {
3746
+ __attribute__((unused)) char buffer[64];
3747
+ out.append("TextStateResponse {\n");
3748
+ out.append(" key: ");
3749
+ snprintf(buffer, sizeof(buffer), "%" PRIu32, this->key);
3750
+ out.append(buffer);
3751
+ out.append("\n");
3752
+
3753
+ out.append(" state: ");
3754
+ out.append("'").append(this->state).append("'");
3755
+ out.append("\n");
3756
+
3757
+ out.append(" missing_state: ");
3758
+ out.append(YESNO(this->missing_state));
3759
+ out.append("\n");
3760
+
3761
+ out.append(" device_id: ");
3762
+ snprintf(buffer, sizeof(buffer), "%" PRIu32, this->device_id);
3763
+ out.append(buffer);
3764
+ out.append("\n");
3765
+ out.append("}");
3766
+ }
3767
+ void TextCommandRequest::dump_to(std::string &out) const {
3768
+ __attribute__((unused)) char buffer[64];
3769
+ out.append("TextCommandRequest {\n");
3770
+ out.append(" key: ");
3771
+ snprintf(buffer, sizeof(buffer), "%" PRIu32, this->key);
3772
+ out.append(buffer);
3773
+ out.append("\n");
3774
+
3775
+ out.append(" state: ");
3776
+ out.append("'").append(this->state).append("'");
3777
+ out.append("\n");
3778
+ out.append("}");
3779
+ }
3780
+ #endif
3781
+ #ifdef USE_DATETIME_DATE
3782
+ void ListEntitiesDateResponse::dump_to(std::string &out) const {
3783
+ __attribute__((unused)) char buffer[64];
3784
+ out.append("ListEntitiesDateResponse {\n");
3785
+ out.append(" object_id: ");
3786
+ out.append("'").append(this->object_id).append("'");
3787
+ out.append("\n");
3788
+
3789
+ out.append(" key: ");
3790
+ snprintf(buffer, sizeof(buffer), "%" PRIu32, this->key);
3791
+ out.append(buffer);
3792
+ out.append("\n");
3793
+
3794
+ out.append(" name: ");
3795
+ out.append("'").append(this->name).append("'");
3796
+ out.append("\n");
3797
+
3798
+ out.append(" unique_id: ");
3799
+ out.append("'").append(this->unique_id).append("'");
3800
+ out.append("\n");
3801
+
3802
+ out.append(" icon: ");
3803
+ out.append("'").append(this->icon).append("'");
3804
+ out.append("\n");
3805
+
3806
+ out.append(" disabled_by_default: ");
3807
+ out.append(YESNO(this->disabled_by_default));
3808
+ out.append("\n");
3809
+
3810
+ out.append(" entity_category: ");
3811
+ out.append(proto_enum_to_string<enums::EntityCategory>(this->entity_category));
3812
+ out.append("\n");
3813
+
3814
+ out.append(" device_id: ");
3815
+ snprintf(buffer, sizeof(buffer), "%" PRIu32, this->device_id);
3816
+ out.append(buffer);
3817
+ out.append("\n");
3818
+ out.append("}");
3819
+ }
3820
+ void DateStateResponse::dump_to(std::string &out) const {
3821
+ __attribute__((unused)) char buffer[64];
3822
+ out.append("DateStateResponse {\n");
3823
+ out.append(" key: ");
3824
+ snprintf(buffer, sizeof(buffer), "%" PRIu32, this->key);
3825
+ out.append(buffer);
3826
+ out.append("\n");
3827
+
3828
+ out.append(" missing_state: ");
3829
+ out.append(YESNO(this->missing_state));
3830
+ out.append("\n");
3831
+
3832
+ out.append(" year: ");
3833
+ snprintf(buffer, sizeof(buffer), "%" PRIu32, this->year);
3834
+ out.append(buffer);
3835
+ out.append("\n");
3836
+
3837
+ out.append(" month: ");
3838
+ snprintf(buffer, sizeof(buffer), "%" PRIu32, this->month);
3839
+ out.append(buffer);
3840
+ out.append("\n");
3841
+
3842
+ out.append(" day: ");
3843
+ snprintf(buffer, sizeof(buffer), "%" PRIu32, this->day);
3844
+ out.append(buffer);
3845
+ out.append("\n");
3846
+
3847
+ out.append(" device_id: ");
3848
+ snprintf(buffer, sizeof(buffer), "%" PRIu32, this->device_id);
3849
+ out.append(buffer);
3850
+ out.append("\n");
3851
+ out.append("}");
3852
+ }
3853
+ void DateCommandRequest::dump_to(std::string &out) const {
3854
+ __attribute__((unused)) char buffer[64];
3855
+ out.append("DateCommandRequest {\n");
3856
+ out.append(" key: ");
3857
+ snprintf(buffer, sizeof(buffer), "%" PRIu32, this->key);
3858
+ out.append(buffer);
3859
+ out.append("\n");
3860
+
3861
+ out.append(" year: ");
3862
+ snprintf(buffer, sizeof(buffer), "%" PRIu32, this->year);
3863
+ out.append(buffer);
3864
+ out.append("\n");
3865
+
3866
+ out.append(" month: ");
3867
+ snprintf(buffer, sizeof(buffer), "%" PRIu32, this->month);
3868
+ out.append(buffer);
3869
+ out.append("\n");
3870
+
3871
+ out.append(" day: ");
3872
+ snprintf(buffer, sizeof(buffer), "%" PRIu32, this->day);
3873
+ out.append(buffer);
3874
+ out.append("\n");
3875
+ out.append("}");
3876
+ }
3877
+ #endif
3878
+ #ifdef USE_DATETIME_TIME
3879
+ void ListEntitiesTimeResponse::dump_to(std::string &out) const {
3880
+ __attribute__((unused)) char buffer[64];
3881
+ out.append("ListEntitiesTimeResponse {\n");
3882
+ out.append(" object_id: ");
3883
+ out.append("'").append(this->object_id).append("'");
3884
+ out.append("\n");
3885
+
3886
+ out.append(" key: ");
3887
+ snprintf(buffer, sizeof(buffer), "%" PRIu32, this->key);
3888
+ out.append(buffer);
3889
+ out.append("\n");
3890
+
3891
+ out.append(" name: ");
3892
+ out.append("'").append(this->name).append("'");
3893
+ out.append("\n");
3894
+
3895
+ out.append(" unique_id: ");
3896
+ out.append("'").append(this->unique_id).append("'");
3897
+ out.append("\n");
3898
+
3899
+ out.append(" icon: ");
3900
+ out.append("'").append(this->icon).append("'");
3901
+ out.append("\n");
3902
+
3903
+ out.append(" disabled_by_default: ");
3904
+ out.append(YESNO(this->disabled_by_default));
3905
+ out.append("\n");
3906
+
3907
+ out.append(" entity_category: ");
3908
+ out.append(proto_enum_to_string<enums::EntityCategory>(this->entity_category));
3909
+ out.append("\n");
3910
+
3911
+ out.append(" device_id: ");
3912
+ snprintf(buffer, sizeof(buffer), "%" PRIu32, this->device_id);
3913
+ out.append(buffer);
3914
+ out.append("\n");
3915
+ out.append("}");
3916
+ }
3917
+ void TimeStateResponse::dump_to(std::string &out) const {
3918
+ __attribute__((unused)) char buffer[64];
3919
+ out.append("TimeStateResponse {\n");
3920
+ out.append(" key: ");
3921
+ snprintf(buffer, sizeof(buffer), "%" PRIu32, this->key);
3922
+ out.append(buffer);
3923
+ out.append("\n");
3924
+
3925
+ out.append(" missing_state: ");
3926
+ out.append(YESNO(this->missing_state));
3927
+ out.append("\n");
3928
+
3929
+ out.append(" hour: ");
3930
+ snprintf(buffer, sizeof(buffer), "%" PRIu32, this->hour);
3931
+ out.append(buffer);
3932
+ out.append("\n");
3933
+
3934
+ out.append(" minute: ");
3935
+ snprintf(buffer, sizeof(buffer), "%" PRIu32, this->minute);
3936
+ out.append(buffer);
3937
+ out.append("\n");
3938
+
3939
+ out.append(" second: ");
3940
+ snprintf(buffer, sizeof(buffer), "%" PRIu32, this->second);
3941
+ out.append(buffer);
3942
+ out.append("\n");
3943
+
3944
+ out.append(" device_id: ");
3945
+ snprintf(buffer, sizeof(buffer), "%" PRIu32, this->device_id);
3946
+ out.append(buffer);
3947
+ out.append("\n");
3948
+ out.append("}");
3949
+ }
3950
+ void TimeCommandRequest::dump_to(std::string &out) const {
3951
+ __attribute__((unused)) char buffer[64];
3952
+ out.append("TimeCommandRequest {\n");
3953
+ out.append(" key: ");
3954
+ snprintf(buffer, sizeof(buffer), "%" PRIu32, this->key);
3955
+ out.append(buffer);
3956
+ out.append("\n");
3957
+
3958
+ out.append(" hour: ");
3959
+ snprintf(buffer, sizeof(buffer), "%" PRIu32, this->hour);
3960
+ out.append(buffer);
3961
+ out.append("\n");
3962
+
3963
+ out.append(" minute: ");
3964
+ snprintf(buffer, sizeof(buffer), "%" PRIu32, this->minute);
3965
+ out.append(buffer);
3966
+ out.append("\n");
3967
+
3968
+ out.append(" second: ");
3969
+ snprintf(buffer, sizeof(buffer), "%" PRIu32, this->second);
3970
+ out.append(buffer);
3971
+ out.append("\n");
3972
+ out.append("}");
3973
+ }
3974
+ #endif
3975
+ #ifdef USE_EVENT
3976
+ void ListEntitiesEventResponse::dump_to(std::string &out) const {
3977
+ __attribute__((unused)) char buffer[64];
3978
+ out.append("ListEntitiesEventResponse {\n");
3979
+ out.append(" object_id: ");
3980
+ out.append("'").append(this->object_id).append("'");
3981
+ out.append("\n");
3982
+
3983
+ out.append(" key: ");
3984
+ snprintf(buffer, sizeof(buffer), "%" PRIu32, this->key);
3985
+ out.append(buffer);
3986
+ out.append("\n");
3987
+
3988
+ out.append(" name: ");
3989
+ out.append("'").append(this->name).append("'");
3990
+ out.append("\n");
3991
+
3992
+ out.append(" unique_id: ");
3993
+ out.append("'").append(this->unique_id).append("'");
3994
+ out.append("\n");
3995
+
3996
+ out.append(" icon: ");
3997
+ out.append("'").append(this->icon).append("'");
3998
+ out.append("\n");
3999
+
4000
+ out.append(" disabled_by_default: ");
4001
+ out.append(YESNO(this->disabled_by_default));
4002
+ out.append("\n");
4003
+
4004
+ out.append(" entity_category: ");
4005
+ out.append(proto_enum_to_string<enums::EntityCategory>(this->entity_category));
4006
+ out.append("\n");
4007
+
4008
+ out.append(" device_class: ");
4009
+ out.append("'").append(this->device_class).append("'");
4010
+ out.append("\n");
4011
+
4012
+ for (const auto &it : this->event_types) {
4013
+ out.append(" event_types: ");
4014
+ out.append("'").append(it).append("'");
4015
+ out.append("\n");
4016
+ }
4017
+
4018
+ out.append(" device_id: ");
4019
+ snprintf(buffer, sizeof(buffer), "%" PRIu32, this->device_id);
4020
+ out.append(buffer);
4021
+ out.append("\n");
4022
+ out.append("}");
4023
+ }
4024
+ void EventResponse::dump_to(std::string &out) const {
4025
+ __attribute__((unused)) char buffer[64];
4026
+ out.append("EventResponse {\n");
4027
+ out.append(" key: ");
4028
+ snprintf(buffer, sizeof(buffer), "%" PRIu32, this->key);
4029
+ out.append(buffer);
4030
+ out.append("\n");
4031
+
4032
+ out.append(" event_type: ");
4033
+ out.append("'").append(this->event_type).append("'");
4034
+ out.append("\n");
4035
+
4036
+ out.append(" device_id: ");
4037
+ snprintf(buffer, sizeof(buffer), "%" PRIu32, this->device_id);
4038
+ out.append(buffer);
4039
+ out.append("\n");
4040
+ out.append("}");
4041
+ }
4042
+ #endif
4043
+ #ifdef USE_VALVE
4044
+ void ListEntitiesValveResponse::dump_to(std::string &out) const {
4045
+ __attribute__((unused)) char buffer[64];
4046
+ out.append("ListEntitiesValveResponse {\n");
4047
+ out.append(" object_id: ");
4048
+ out.append("'").append(this->object_id).append("'");
4049
+ out.append("\n");
4050
+
4051
+ out.append(" key: ");
4052
+ snprintf(buffer, sizeof(buffer), "%" PRIu32, this->key);
4053
+ out.append(buffer);
4054
+ out.append("\n");
4055
+
4056
+ out.append(" name: ");
4057
+ out.append("'").append(this->name).append("'");
4058
+ out.append("\n");
4059
+
4060
+ out.append(" unique_id: ");
4061
+ out.append("'").append(this->unique_id).append("'");
4062
+ out.append("\n");
4063
+
4064
+ out.append(" icon: ");
4065
+ out.append("'").append(this->icon).append("'");
4066
+ out.append("\n");
4067
+
4068
+ out.append(" disabled_by_default: ");
4069
+ out.append(YESNO(this->disabled_by_default));
4070
+ out.append("\n");
4071
+
4072
+ out.append(" entity_category: ");
4073
+ out.append(proto_enum_to_string<enums::EntityCategory>(this->entity_category));
4074
+ out.append("\n");
4075
+
4076
+ out.append(" device_class: ");
4077
+ out.append("'").append(this->device_class).append("'");
4078
+ out.append("\n");
4079
+
4080
+ out.append(" assumed_state: ");
4081
+ out.append(YESNO(this->assumed_state));
4082
+ out.append("\n");
4083
+
4084
+ out.append(" supports_position: ");
4085
+ out.append(YESNO(this->supports_position));
4086
+ out.append("\n");
4087
+
4088
+ out.append(" supports_stop: ");
4089
+ out.append(YESNO(this->supports_stop));
4090
+ out.append("\n");
4091
+
4092
+ out.append(" device_id: ");
4093
+ snprintf(buffer, sizeof(buffer), "%" PRIu32, this->device_id);
4094
+ out.append(buffer);
4095
+ out.append("\n");
4096
+ out.append("}");
4097
+ }
4098
+ void ValveStateResponse::dump_to(std::string &out) const {
4099
+ __attribute__((unused)) char buffer[64];
4100
+ out.append("ValveStateResponse {\n");
4101
+ out.append(" key: ");
4102
+ snprintf(buffer, sizeof(buffer), "%" PRIu32, this->key);
4103
+ out.append(buffer);
4104
+ out.append("\n");
4105
+
4106
+ out.append(" position: ");
4107
+ snprintf(buffer, sizeof(buffer), "%g", this->position);
4108
+ out.append(buffer);
4109
+ out.append("\n");
4110
+
4111
+ out.append(" current_operation: ");
4112
+ out.append(proto_enum_to_string<enums::ValveOperation>(this->current_operation));
4113
+ out.append("\n");
4114
+
4115
+ out.append(" device_id: ");
4116
+ snprintf(buffer, sizeof(buffer), "%" PRIu32, this->device_id);
4117
+ out.append(buffer);
4118
+ out.append("\n");
4119
+ out.append("}");
4120
+ }
4121
+ void ValveCommandRequest::dump_to(std::string &out) const {
4122
+ __attribute__((unused)) char buffer[64];
4123
+ out.append("ValveCommandRequest {\n");
4124
+ out.append(" key: ");
4125
+ snprintf(buffer, sizeof(buffer), "%" PRIu32, this->key);
4126
+ out.append(buffer);
4127
+ out.append("\n");
4128
+
4129
+ out.append(" has_position: ");
4130
+ out.append(YESNO(this->has_position));
4131
+ out.append("\n");
4132
+
4133
+ out.append(" position: ");
4134
+ snprintf(buffer, sizeof(buffer), "%g", this->position);
4135
+ out.append(buffer);
4136
+ out.append("\n");
4137
+
4138
+ out.append(" stop: ");
4139
+ out.append(YESNO(this->stop));
4140
+ out.append("\n");
4141
+ out.append("}");
4142
+ }
4143
+ #endif
4144
+ #ifdef USE_DATETIME_DATETIME
4145
+ void ListEntitiesDateTimeResponse::dump_to(std::string &out) const {
4146
+ __attribute__((unused)) char buffer[64];
4147
+ out.append("ListEntitiesDateTimeResponse {\n");
4148
+ out.append(" object_id: ");
4149
+ out.append("'").append(this->object_id).append("'");
4150
+ out.append("\n");
4151
+
4152
+ out.append(" key: ");
4153
+ snprintf(buffer, sizeof(buffer), "%" PRIu32, this->key);
4154
+ out.append(buffer);
4155
+ out.append("\n");
4156
+
4157
+ out.append(" name: ");
4158
+ out.append("'").append(this->name).append("'");
4159
+ out.append("\n");
4160
+
4161
+ out.append(" unique_id: ");
4162
+ out.append("'").append(this->unique_id).append("'");
4163
+ out.append("\n");
4164
+
4165
+ out.append(" icon: ");
4166
+ out.append("'").append(this->icon).append("'");
4167
+ out.append("\n");
4168
+
4169
+ out.append(" disabled_by_default: ");
4170
+ out.append(YESNO(this->disabled_by_default));
4171
+ out.append("\n");
4172
+
4173
+ out.append(" entity_category: ");
4174
+ out.append(proto_enum_to_string<enums::EntityCategory>(this->entity_category));
4175
+ out.append("\n");
4176
+
4177
+ out.append(" device_id: ");
4178
+ snprintf(buffer, sizeof(buffer), "%" PRIu32, this->device_id);
4179
+ out.append(buffer);
4180
+ out.append("\n");
4181
+ out.append("}");
4182
+ }
4183
+ void DateTimeStateResponse::dump_to(std::string &out) const {
4184
+ __attribute__((unused)) char buffer[64];
4185
+ out.append("DateTimeStateResponse {\n");
4186
+ out.append(" key: ");
4187
+ snprintf(buffer, sizeof(buffer), "%" PRIu32, this->key);
4188
+ out.append(buffer);
4189
+ out.append("\n");
4190
+
4191
+ out.append(" missing_state: ");
4192
+ out.append(YESNO(this->missing_state));
4193
+ out.append("\n");
4194
+
4195
+ out.append(" epoch_seconds: ");
4196
+ snprintf(buffer, sizeof(buffer), "%" PRIu32, this->epoch_seconds);
4197
+ out.append(buffer);
4198
+ out.append("\n");
4199
+
4200
+ out.append(" device_id: ");
4201
+ snprintf(buffer, sizeof(buffer), "%" PRIu32, this->device_id);
4202
+ out.append(buffer);
4203
+ out.append("\n");
4204
+ out.append("}");
4205
+ }
4206
+ void DateTimeCommandRequest::dump_to(std::string &out) const {
4207
+ __attribute__((unused)) char buffer[64];
4208
+ out.append("DateTimeCommandRequest {\n");
4209
+ out.append(" key: ");
4210
+ snprintf(buffer, sizeof(buffer), "%" PRIu32, this->key);
4211
+ out.append(buffer);
4212
+ out.append("\n");
4213
+
4214
+ out.append(" epoch_seconds: ");
4215
+ snprintf(buffer, sizeof(buffer), "%" PRIu32, this->epoch_seconds);
4216
+ out.append(buffer);
4217
+ out.append("\n");
4218
+ out.append("}");
4219
+ }
4220
+ #endif
4221
+ #ifdef USE_UPDATE
4222
+ void ListEntitiesUpdateResponse::dump_to(std::string &out) const {
4223
+ __attribute__((unused)) char buffer[64];
4224
+ out.append("ListEntitiesUpdateResponse {\n");
4225
+ out.append(" object_id: ");
4226
+ out.append("'").append(this->object_id).append("'");
4227
+ out.append("\n");
4228
+
4229
+ out.append(" key: ");
4230
+ snprintf(buffer, sizeof(buffer), "%" PRIu32, this->key);
4231
+ out.append(buffer);
4232
+ out.append("\n");
4233
+
4234
+ out.append(" name: ");
4235
+ out.append("'").append(this->name).append("'");
4236
+ out.append("\n");
4237
+
4238
+ out.append(" unique_id: ");
4239
+ out.append("'").append(this->unique_id).append("'");
4240
+ out.append("\n");
4241
+
4242
+ out.append(" icon: ");
4243
+ out.append("'").append(this->icon).append("'");
4244
+ out.append("\n");
4245
+
4246
+ out.append(" disabled_by_default: ");
4247
+ out.append(YESNO(this->disabled_by_default));
4248
+ out.append("\n");
4249
+
4250
+ out.append(" entity_category: ");
4251
+ out.append(proto_enum_to_string<enums::EntityCategory>(this->entity_category));
4252
+ out.append("\n");
4253
+
4254
+ out.append(" device_class: ");
4255
+ out.append("'").append(this->device_class).append("'");
4256
+ out.append("\n");
4257
+
4258
+ out.append(" device_id: ");
4259
+ snprintf(buffer, sizeof(buffer), "%" PRIu32, this->device_id);
4260
+ out.append(buffer);
4261
+ out.append("\n");
4262
+ out.append("}");
4263
+ }
4264
+ void UpdateStateResponse::dump_to(std::string &out) const {
4265
+ __attribute__((unused)) char buffer[64];
4266
+ out.append("UpdateStateResponse {\n");
4267
+ out.append(" key: ");
4268
+ snprintf(buffer, sizeof(buffer), "%" PRIu32, this->key);
4269
+ out.append(buffer);
4270
+ out.append("\n");
4271
+
4272
+ out.append(" missing_state: ");
4273
+ out.append(YESNO(this->missing_state));
4274
+ out.append("\n");
4275
+
4276
+ out.append(" in_progress: ");
4277
+ out.append(YESNO(this->in_progress));
4278
+ out.append("\n");
4279
+
4280
+ out.append(" has_progress: ");
4281
+ out.append(YESNO(this->has_progress));
4282
+ out.append("\n");
4283
+
4284
+ out.append(" progress: ");
4285
+ snprintf(buffer, sizeof(buffer), "%g", this->progress);
4286
+ out.append(buffer);
4287
+ out.append("\n");
4288
+
4289
+ out.append(" current_version: ");
4290
+ out.append("'").append(this->current_version).append("'");
4291
+ out.append("\n");
4292
+
4293
+ out.append(" latest_version: ");
4294
+ out.append("'").append(this->latest_version).append("'");
4295
+ out.append("\n");
4296
+
4297
+ out.append(" title: ");
4298
+ out.append("'").append(this->title).append("'");
4299
+ out.append("\n");
4300
+
4301
+ out.append(" release_summary: ");
4302
+ out.append("'").append(this->release_summary).append("'");
4303
+ out.append("\n");
4304
+
4305
+ out.append(" release_url: ");
4306
+ out.append("'").append(this->release_url).append("'");
4307
+ out.append("\n");
4308
+
4309
+ out.append(" device_id: ");
4310
+ snprintf(buffer, sizeof(buffer), "%" PRIu32, this->device_id);
4311
+ out.append(buffer);
4312
+ out.append("\n");
4313
+ out.append("}");
4314
+ }
4315
+ void UpdateCommandRequest::dump_to(std::string &out) const {
4316
+ __attribute__((unused)) char buffer[64];
4317
+ out.append("UpdateCommandRequest {\n");
4318
+ out.append(" key: ");
4319
+ snprintf(buffer, sizeof(buffer), "%" PRIu32, this->key);
4320
+ out.append(buffer);
4321
+ out.append("\n");
4322
+
4323
+ out.append(" command: ");
4324
+ out.append(proto_enum_to_string<enums::UpdateCommand>(this->command));
4325
+ out.append("\n");
4326
+ out.append("}");
4327
+ }
4328
+ #endif
4329
+
4330
+ } // namespace api
4331
+ } // namespace esphome
4332
+
4333
+ #endif // HAS_PROTO_MESSAGE_DUMP