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