11 #ifdef HAS_PROTO_MESSAGE_DUMP 15 return "ENTITY_CATEGORY_NONE";
17 return "ENTITY_CATEGORY_CONFIG";
19 return "ENTITY_CATEGORY_DIAGNOSTIC";
25 #ifdef HAS_PROTO_MESSAGE_DUMP 29 return "LEGACY_COVER_STATE_OPEN";
31 return "LEGACY_COVER_STATE_CLOSED";
37 #ifdef HAS_PROTO_MESSAGE_DUMP 41 return "COVER_OPERATION_IDLE";
43 return "COVER_OPERATION_IS_OPENING";
45 return "COVER_OPERATION_IS_CLOSING";
51 #ifdef HAS_PROTO_MESSAGE_DUMP 55 return "LEGACY_COVER_COMMAND_OPEN";
57 return "LEGACY_COVER_COMMAND_CLOSE";
59 return "LEGACY_COVER_COMMAND_STOP";
65 #ifdef HAS_PROTO_MESSAGE_DUMP 66 template<>
const char *proto_enum_to_string<enums::FanSpeed>(
enums::FanSpeed value) {
69 return "FAN_SPEED_LOW";
71 return "FAN_SPEED_MEDIUM";
73 return "FAN_SPEED_HIGH";
79 #ifdef HAS_PROTO_MESSAGE_DUMP 83 return "FAN_DIRECTION_FORWARD";
85 return "FAN_DIRECTION_REVERSE";
91 #ifdef HAS_PROTO_MESSAGE_DUMP 92 template<>
const char *proto_enum_to_string<enums::ColorMode>(
enums::ColorMode value) {
95 return "COLOR_MODE_UNKNOWN";
97 return "COLOR_MODE_ON_OFF";
99 return "COLOR_MODE_BRIGHTNESS";
101 return "COLOR_MODE_WHITE";
103 return "COLOR_MODE_COLOR_TEMPERATURE";
105 return "COLOR_MODE_COLD_WARM_WHITE";
107 return "COLOR_MODE_RGB";
109 return "COLOR_MODE_RGB_WHITE";
111 return "COLOR_MODE_RGB_COLOR_TEMPERATURE";
113 return "COLOR_MODE_RGB_COLD_WARM_WHITE";
119 #ifdef HAS_PROTO_MESSAGE_DUMP 123 return "STATE_CLASS_NONE";
125 return "STATE_CLASS_MEASUREMENT";
127 return "STATE_CLASS_TOTAL_INCREASING";
129 return "STATE_CLASS_TOTAL";
135 #ifdef HAS_PROTO_MESSAGE_DUMP 139 return "LAST_RESET_NONE";
141 return "LAST_RESET_NEVER";
143 return "LAST_RESET_AUTO";
149 #ifdef HAS_PROTO_MESSAGE_DUMP 153 return "LOG_LEVEL_NONE";
155 return "LOG_LEVEL_ERROR";
157 return "LOG_LEVEL_WARN";
159 return "LOG_LEVEL_INFO";
161 return "LOG_LEVEL_CONFIG";
163 return "LOG_LEVEL_DEBUG";
165 return "LOG_LEVEL_VERBOSE";
167 return "LOG_LEVEL_VERY_VERBOSE";
173 #ifdef HAS_PROTO_MESSAGE_DUMP 177 return "SERVICE_ARG_TYPE_BOOL";
179 return "SERVICE_ARG_TYPE_INT";
181 return "SERVICE_ARG_TYPE_FLOAT";
183 return "SERVICE_ARG_TYPE_STRING";
185 return "SERVICE_ARG_TYPE_BOOL_ARRAY";
187 return "SERVICE_ARG_TYPE_INT_ARRAY";
189 return "SERVICE_ARG_TYPE_FLOAT_ARRAY";
191 return "SERVICE_ARG_TYPE_STRING_ARRAY";
197 #ifdef HAS_PROTO_MESSAGE_DUMP 201 return "CLIMATE_MODE_OFF";
203 return "CLIMATE_MODE_HEAT_COOL";
205 return "CLIMATE_MODE_COOL";
207 return "CLIMATE_MODE_HEAT";
209 return "CLIMATE_MODE_FAN_ONLY";
211 return "CLIMATE_MODE_DRY";
213 return "CLIMATE_MODE_AUTO";
219 #ifdef HAS_PROTO_MESSAGE_DUMP 223 return "CLIMATE_FAN_ON";
225 return "CLIMATE_FAN_OFF";
227 return "CLIMATE_FAN_AUTO";
229 return "CLIMATE_FAN_LOW";
231 return "CLIMATE_FAN_MEDIUM";
233 return "CLIMATE_FAN_HIGH";
235 return "CLIMATE_FAN_MIDDLE";
237 return "CLIMATE_FAN_FOCUS";
239 return "CLIMATE_FAN_DIFFUSE";
241 return "CLIMATE_FAN_QUIET";
247 #ifdef HAS_PROTO_MESSAGE_DUMP 251 return "CLIMATE_SWING_OFF";
253 return "CLIMATE_SWING_BOTH";
255 return "CLIMATE_SWING_VERTICAL";
257 return "CLIMATE_SWING_HORIZONTAL";
263 #ifdef HAS_PROTO_MESSAGE_DUMP 267 return "CLIMATE_ACTION_OFF";
269 return "CLIMATE_ACTION_COOLING";
271 return "CLIMATE_ACTION_HEATING";
273 return "CLIMATE_ACTION_IDLE";
275 return "CLIMATE_ACTION_DRYING";
277 return "CLIMATE_ACTION_FAN";
283 #ifdef HAS_PROTO_MESSAGE_DUMP 287 return "CLIMATE_PRESET_NONE";
289 return "CLIMATE_PRESET_HOME";
291 return "CLIMATE_PRESET_AWAY";
293 return "CLIMATE_PRESET_BOOST";
295 return "CLIMATE_PRESET_COMFORT";
297 return "CLIMATE_PRESET_ECO";
299 return "CLIMATE_PRESET_SLEEP";
301 return "CLIMATE_PRESET_ACTIVITY";
307 #ifdef HAS_PROTO_MESSAGE_DUMP 311 return "NUMBER_MODE_AUTO";
313 return "NUMBER_MODE_BOX";
315 return "NUMBER_MODE_SLIDER";
321 #ifdef HAS_PROTO_MESSAGE_DUMP 325 return "LOCK_STATE_NONE";
327 return "LOCK_STATE_LOCKED";
329 return "LOCK_STATE_UNLOCKED";
331 return "LOCK_STATE_JAMMED";
333 return "LOCK_STATE_LOCKING";
335 return "LOCK_STATE_UNLOCKING";
341 #ifdef HAS_PROTO_MESSAGE_DUMP 345 return "LOCK_UNLOCK";
355 #ifdef HAS_PROTO_MESSAGE_DUMP 359 return "MEDIA_PLAYER_STATE_NONE";
361 return "MEDIA_PLAYER_STATE_IDLE";
363 return "MEDIA_PLAYER_STATE_PLAYING";
365 return "MEDIA_PLAYER_STATE_PAUSED";
371 #ifdef HAS_PROTO_MESSAGE_DUMP 375 return "MEDIA_PLAYER_COMMAND_PLAY";
377 return "MEDIA_PLAYER_COMMAND_PAUSE";
379 return "MEDIA_PLAYER_COMMAND_STOP";
381 return "MEDIA_PLAYER_COMMAND_MUTE";
383 return "MEDIA_PLAYER_COMMAND_UNMUTE";
389 #ifdef HAS_PROTO_MESSAGE_DUMP 393 return "MEDIA_PLAYER_FORMAT_PURPOSE_DEFAULT";
395 return "MEDIA_PLAYER_FORMAT_PURPOSE_ANNOUNCEMENT";
401 #ifdef HAS_PROTO_MESSAGE_DUMP 406 return "BLUETOOTH_DEVICE_REQUEST_TYPE_CONNECT";
408 return "BLUETOOTH_DEVICE_REQUEST_TYPE_DISCONNECT";
410 return "BLUETOOTH_DEVICE_REQUEST_TYPE_PAIR";
412 return "BLUETOOTH_DEVICE_REQUEST_TYPE_UNPAIR";
414 return "BLUETOOTH_DEVICE_REQUEST_TYPE_CONNECT_V3_WITH_CACHE";
416 return "BLUETOOTH_DEVICE_REQUEST_TYPE_CONNECT_V3_WITHOUT_CACHE";
418 return "BLUETOOTH_DEVICE_REQUEST_TYPE_CLEAR_CACHE";
424 #ifdef HAS_PROTO_MESSAGE_DUMP 429 return "VOICE_ASSISTANT_SUBSCRIBE_NONE";
431 return "VOICE_ASSISTANT_SUBSCRIBE_API_AUDIO";
437 #ifdef HAS_PROTO_MESSAGE_DUMP 441 return "VOICE_ASSISTANT_REQUEST_NONE";
443 return "VOICE_ASSISTANT_REQUEST_USE_VAD";
445 return "VOICE_ASSISTANT_REQUEST_USE_WAKE_WORD";
451 #ifdef HAS_PROTO_MESSAGE_DUMP 455 return "VOICE_ASSISTANT_ERROR";
457 return "VOICE_ASSISTANT_RUN_START";
459 return "VOICE_ASSISTANT_RUN_END";
461 return "VOICE_ASSISTANT_STT_START";
463 return "VOICE_ASSISTANT_STT_END";
465 return "VOICE_ASSISTANT_INTENT_START";
467 return "VOICE_ASSISTANT_INTENT_END";
469 return "VOICE_ASSISTANT_TTS_START";
471 return "VOICE_ASSISTANT_TTS_END";
473 return "VOICE_ASSISTANT_WAKE_WORD_START";
475 return "VOICE_ASSISTANT_WAKE_WORD_END";
477 return "VOICE_ASSISTANT_STT_VAD_START";
479 return "VOICE_ASSISTANT_STT_VAD_END";
481 return "VOICE_ASSISTANT_TTS_STREAM_START";
483 return "VOICE_ASSISTANT_TTS_STREAM_END";
489 #ifdef HAS_PROTO_MESSAGE_DUMP 493 return "VOICE_ASSISTANT_TIMER_STARTED";
495 return "VOICE_ASSISTANT_TIMER_UPDATED";
497 return "VOICE_ASSISTANT_TIMER_CANCELLED";
499 return "VOICE_ASSISTANT_TIMER_FINISHED";
505 #ifdef HAS_PROTO_MESSAGE_DUMP 509 return "ALARM_STATE_DISARMED";
511 return "ALARM_STATE_ARMED_HOME";
513 return "ALARM_STATE_ARMED_AWAY";
515 return "ALARM_STATE_ARMED_NIGHT";
517 return "ALARM_STATE_ARMED_VACATION";
519 return "ALARM_STATE_ARMED_CUSTOM_BYPASS";
521 return "ALARM_STATE_PENDING";
523 return "ALARM_STATE_ARMING";
525 return "ALARM_STATE_DISARMING";
527 return "ALARM_STATE_TRIGGERED";
533 #ifdef HAS_PROTO_MESSAGE_DUMP 538 return "ALARM_CONTROL_PANEL_DISARM";
540 return "ALARM_CONTROL_PANEL_ARM_AWAY";
542 return "ALARM_CONTROL_PANEL_ARM_HOME";
544 return "ALARM_CONTROL_PANEL_ARM_NIGHT";
546 return "ALARM_CONTROL_PANEL_ARM_VACATION";
548 return "ALARM_CONTROL_PANEL_ARM_CUSTOM_BYPASS";
550 return "ALARM_CONTROL_PANEL_TRIGGER";
556 #ifdef HAS_PROTO_MESSAGE_DUMP 560 return "TEXT_MODE_TEXT";
562 return "TEXT_MODE_PASSWORD";
568 #ifdef HAS_PROTO_MESSAGE_DUMP 572 return "VALVE_OPERATION_IDLE";
574 return "VALVE_OPERATION_IS_OPENING";
576 return "VALVE_OPERATION_IS_CLOSING";
582 #ifdef HAS_PROTO_MESSAGE_DUMP 586 return "UPDATE_COMMAND_NONE";
588 return "UPDATE_COMMAND_UPDATE";
590 return "UPDATE_COMMAND_CHECK";
625 #ifdef HAS_PROTO_MESSAGE_DUMP 628 out.append(
"HelloRequest {\n");
629 out.append(
" client_info: ");
630 out.append(
"'").append(this->
client_info).append(
"'");
633 out.append(
" api_version_major: ");
638 out.append(
" api_version_minor: ");
679 #ifdef HAS_PROTO_MESSAGE_DUMP 682 out.append(
"HelloResponse {\n");
683 out.append(
" api_version_major: ");
688 out.append(
" api_version_minor: ");
693 out.append(
" server_info: ");
694 out.append(
"'").append(this->server_info).append(
"'");
697 out.append(
" name: ");
698 out.append(
"'").append(this->
name).append(
"'");
714 #ifdef HAS_PROTO_MESSAGE_DUMP 717 out.append(
"ConnectRequest {\n");
718 out.append(
" password: ");
719 out.append(
"'").append(this->password).append(
"'");
727 this->invalid_password = value.
as_bool();
735 #ifdef HAS_PROTO_MESSAGE_DUMP 738 out.append(
"ConnectResponse {\n");
739 out.append(
" invalid_password: ");
740 out.append(YESNO(this->invalid_password));
746 #ifdef HAS_PROTO_MESSAGE_DUMP 750 #ifdef HAS_PROTO_MESSAGE_DUMP 754 #ifdef HAS_PROTO_MESSAGE_DUMP 758 #ifdef HAS_PROTO_MESSAGE_DUMP 762 #ifdef HAS_PROTO_MESSAGE_DUMP 768 this->uses_password = value.
as_bool();
772 this->has_deep_sleep = value.
as_bool();
776 this->webserver_port = value.
as_uint32();
780 this->legacy_bluetooth_proxy_version = value.
as_uint32();
784 this->bluetooth_proxy_feature_flags = value.
as_uint32();
788 this->legacy_voice_assistant_version = value.
as_uint32();
792 this->voice_assistant_feature_flags = value.
as_uint32();
810 this->esphome_version = value.
as_string();
814 this->compilation_time = value.
as_string();
826 this->project_version = value.
as_string();
838 this->suggested_area = value.
as_string();
856 buffer.
encode_uint32(11, this->legacy_bluetooth_proxy_version);
857 buffer.
encode_uint32(15, this->bluetooth_proxy_feature_flags);
860 buffer.
encode_uint32(14, this->legacy_voice_assistant_version);
861 buffer.
encode_uint32(17, this->voice_assistant_feature_flags);
864 #ifdef HAS_PROTO_MESSAGE_DUMP 867 out.append(
"DeviceInfoResponse {\n");
868 out.append(
" uses_password: ");
869 out.append(YESNO(this->uses_password));
872 out.append(
" name: ");
873 out.append(
"'").append(this->
name).append(
"'");
876 out.append(
" mac_address: ");
877 out.append(
"'").append(this->mac_address).append(
"'");
880 out.append(
" esphome_version: ");
881 out.append(
"'").append(this->esphome_version).append(
"'");
884 out.append(
" compilation_time: ");
885 out.append(
"'").append(this->compilation_time).append(
"'");
888 out.append(
" model: ");
889 out.append(
"'").append(this->model).append(
"'");
892 out.append(
" has_deep_sleep: ");
893 out.append(YESNO(this->has_deep_sleep));
896 out.append(
" project_name: ");
897 out.append(
"'").append(this->project_name).append(
"'");
900 out.append(
" project_version: ");
901 out.append(
"'").append(this->project_version).append(
"'");
904 out.append(
" webserver_port: ");
905 sprintf(buffer,
"%" PRIu32, this->webserver_port);
909 out.append(
" legacy_bluetooth_proxy_version: ");
910 sprintf(buffer,
"%" PRIu32, this->legacy_bluetooth_proxy_version);
914 out.append(
" bluetooth_proxy_feature_flags: ");
915 sprintf(buffer,
"%" PRIu32, this->bluetooth_proxy_feature_flags);
919 out.append(
" manufacturer: ");
920 out.append(
"'").append(this->manufacturer).append(
"'");
923 out.append(
" friendly_name: ");
924 out.append(
"'").append(this->friendly_name).append(
"'");
927 out.append(
" legacy_voice_assistant_version: ");
928 sprintf(buffer,
"%" PRIu32, this->legacy_voice_assistant_version);
932 out.append(
" voice_assistant_feature_flags: ");
933 sprintf(buffer,
"%" PRIu32, this->voice_assistant_feature_flags);
937 out.append(
" suggested_area: ");
938 out.append(
"'").append(this->suggested_area).append(
"'");
944 #ifdef HAS_PROTO_MESSAGE_DUMP 948 #ifdef HAS_PROTO_MESSAGE_DUMP 952 #ifdef HAS_PROTO_MESSAGE_DUMP 958 this->is_status_binary_sensor = value.
as_bool();
962 this->disabled_by_default = value.
as_bool();
1015 buffer.
encode_bool(6, this->is_status_binary_sensor);
1020 #ifdef HAS_PROTO_MESSAGE_DUMP 1023 out.append(
"ListEntitiesBinarySensorResponse {\n");
1024 out.append(
" object_id: ");
1025 out.append(
"'").append(this->object_id).append(
"'");
1028 out.append(
" key: ");
1029 sprintf(buffer,
"%" PRIu32, this->key);
1033 out.append(
" name: ");
1034 out.append(
"'").append(this->
name).append(
"'");
1037 out.append(
" unique_id: ");
1038 out.append(
"'").append(this->unique_id).append(
"'");
1041 out.append(
" device_class: ");
1042 out.append(
"'").append(this->device_class).append(
"'");
1045 out.append(
" is_status_binary_sensor: ");
1046 out.append(YESNO(this->is_status_binary_sensor));
1049 out.append(
" disabled_by_default: ");
1050 out.append(YESNO(this->disabled_by_default));
1053 out.append(
" icon: ");
1054 out.append(
"'").append(this->icon).append(
"'");
1057 out.append(
" entity_category: ");
1058 out.append(proto_enum_to_string<enums::EntityCategory>(this->entity_category));
1070 this->missing_state = value.
as_bool();
1092 #ifdef HAS_PROTO_MESSAGE_DUMP 1095 out.append(
"BinarySensorStateResponse {\n");
1096 out.append(
" key: ");
1097 sprintf(buffer,
"%" PRIu32, this->key);
1101 out.append(
" state: ");
1102 out.append(YESNO(this->
state));
1105 out.append(
" missing_state: ");
1106 out.append(YESNO(this->missing_state));
1114 this->assumed_state = value.
as_bool();
1118 this->supports_position = value.
as_bool();
1122 this->supports_tilt = value.
as_bool();
1126 this->disabled_by_default = value.
as_bool();
1134 this->supports_stop = value.
as_bool();
1191 #ifdef HAS_PROTO_MESSAGE_DUMP 1194 out.append(
"ListEntitiesCoverResponse {\n");
1195 out.append(
" object_id: ");
1196 out.append(
"'").append(this->object_id).append(
"'");
1199 out.append(
" key: ");
1200 sprintf(buffer,
"%" PRIu32, this->key);
1204 out.append(
" name: ");
1205 out.append(
"'").append(this->
name).append(
"'");
1208 out.append(
" unique_id: ");
1209 out.append(
"'").append(this->unique_id).append(
"'");
1212 out.append(
" assumed_state: ");
1213 out.append(YESNO(this->assumed_state));
1216 out.append(
" supports_position: ");
1217 out.append(YESNO(this->supports_position));
1220 out.append(
" supports_tilt: ");
1221 out.append(YESNO(this->supports_tilt));
1224 out.append(
" device_class: ");
1225 out.append(
"'").append(this->device_class).append(
"'");
1228 out.append(
" disabled_by_default: ");
1229 out.append(YESNO(this->disabled_by_default));
1232 out.append(
" icon: ");
1233 out.append(
"'").append(this->icon).append(
"'");
1236 out.append(
" entity_category: ");
1237 out.append(proto_enum_to_string<enums::EntityCategory>(this->entity_category));
1240 out.append(
" supports_stop: ");
1241 out.append(YESNO(this->supports_stop));
1285 #ifdef HAS_PROTO_MESSAGE_DUMP 1288 out.append(
"CoverStateResponse {\n");
1289 out.append(
" key: ");
1290 sprintf(buffer,
"%" PRIu32, this->key);
1294 out.append(
" legacy_state: ");
1295 out.append(proto_enum_to_string<enums::LegacyCoverState>(this->legacy_state));
1298 out.append(
" position: ");
1299 sprintf(buffer,
"%g", this->
position);
1303 out.append(
" tilt: ");
1304 sprintf(buffer,
"%g", this->
tilt);
1308 out.append(
" current_operation: ");
1309 out.append(proto_enum_to_string<enums::CoverOperation>(this->current_operation));
1317 this->has_legacy_command = value.
as_bool();
1325 this->has_position = value.
as_bool();
1329 this->has_tilt = value.
as_bool();
1368 #ifdef HAS_PROTO_MESSAGE_DUMP 1371 out.append(
"CoverCommandRequest {\n");
1372 out.append(
" key: ");
1373 sprintf(buffer,
"%" PRIu32, this->key);
1377 out.append(
" has_legacy_command: ");
1378 out.append(YESNO(this->has_legacy_command));
1381 out.append(
" legacy_command: ");
1382 out.append(proto_enum_to_string<enums::LegacyCoverCommand>(this->legacy_command));
1385 out.append(
" has_position: ");
1386 out.append(YESNO(this->has_position));
1389 out.append(
" position: ");
1390 sprintf(buffer,
"%g", this->
position);
1394 out.append(
" has_tilt: ");
1395 out.append(YESNO(this->has_tilt));
1398 out.append(
" tilt: ");
1399 sprintf(buffer,
"%g", this->
tilt);
1403 out.append(
" stop: ");
1404 out.append(YESNO(this->stop));
1412 this->supports_oscillation = value.
as_bool();
1416 this->supports_speed = value.
as_bool();
1420 this->supports_direction = value.
as_bool();
1424 this->supported_speed_count = value.
as_int32();
1428 this->disabled_by_default = value.
as_bool();
1458 this->supported_preset_modes.push_back(value.
as_string());
1480 buffer.
encode_bool(5, this->supports_oscillation);
1487 for (
auto &it : this->supported_preset_modes) {
1491 #ifdef HAS_PROTO_MESSAGE_DUMP 1494 out.append(
"ListEntitiesFanResponse {\n");
1495 out.append(
" object_id: ");
1496 out.append(
"'").append(this->object_id).append(
"'");
1499 out.append(
" key: ");
1500 sprintf(buffer,
"%" PRIu32, this->key);
1504 out.append(
" name: ");
1505 out.append(
"'").append(this->
name).append(
"'");
1508 out.append(
" unique_id: ");
1509 out.append(
"'").append(this->unique_id).append(
"'");
1512 out.append(
" supports_oscillation: ");
1513 out.append(YESNO(this->supports_oscillation));
1516 out.append(
" supports_speed: ");
1517 out.append(YESNO(this->supports_speed));
1520 out.append(
" supports_direction: ");
1521 out.append(YESNO(this->supports_direction));
1524 out.append(
" supported_speed_count: ");
1525 sprintf(buffer,
"%" PRId32, this->supported_speed_count);
1529 out.append(
" disabled_by_default: ");
1530 out.append(YESNO(this->disabled_by_default));
1533 out.append(
" icon: ");
1534 out.append(
"'").append(this->icon).append(
"'");
1537 out.append(
" entity_category: ");
1538 out.append(proto_enum_to_string<enums::EntityCategory>(this->entity_category));
1541 for (
const auto &it : this->supported_preset_modes) {
1542 out.append(
" supported_preset_modes: ");
1543 out.append(
"'").append(it).append(
"'");
1568 this->speed_level = value.
as_int32();
1604 #ifdef HAS_PROTO_MESSAGE_DUMP 1607 out.append(
"FanStateResponse {\n");
1608 out.append(
" key: ");
1609 sprintf(buffer,
"%" PRIu32, this->key);
1613 out.append(
" state: ");
1614 out.append(YESNO(this->
state));
1617 out.append(
" oscillating: ");
1621 out.append(
" speed: ");
1622 out.append(proto_enum_to_string<enums::FanSpeed>(this->
speed));
1625 out.append(
" direction: ");
1626 out.append(proto_enum_to_string<enums::FanDirection>(this->
direction));
1629 out.append(
" speed_level: ");
1630 sprintf(buffer,
"%" PRId32, this->speed_level);
1634 out.append(
" preset_mode: ");
1635 out.append(
"'").append(this->
preset_mode).append(
"'");
1643 this->has_state = value.
as_bool();
1651 this->has_speed = value.
as_bool();
1659 this->has_oscillating = value.
as_bool();
1667 this->has_direction = value.
as_bool();
1675 this->has_speed_level = value.
as_bool();
1679 this->speed_level = value.
as_int32();
1683 this->has_preset_mode = value.
as_bool();
1725 #ifdef HAS_PROTO_MESSAGE_DUMP 1728 out.append(
"FanCommandRequest {\n");
1729 out.append(
" key: ");
1730 sprintf(buffer,
"%" PRIu32, this->key);
1734 out.append(
" has_state: ");
1735 out.append(YESNO(this->has_state));
1738 out.append(
" state: ");
1739 out.append(YESNO(this->
state));
1742 out.append(
" has_speed: ");
1743 out.append(YESNO(this->has_speed));
1746 out.append(
" speed: ");
1747 out.append(proto_enum_to_string<enums::FanSpeed>(this->
speed));
1750 out.append(
" has_oscillating: ");
1751 out.append(YESNO(this->has_oscillating));
1754 out.append(
" oscillating: ");
1758 out.append(
" has_direction: ");
1759 out.append(YESNO(this->has_direction));
1762 out.append(
" direction: ");
1763 out.append(proto_enum_to_string<enums::FanDirection>(this->
direction));
1766 out.append(
" has_speed_level: ");
1767 out.append(YESNO(this->has_speed_level));
1770 out.append(
" speed_level: ");
1771 sprintf(buffer,
"%" PRId32, this->speed_level);
1775 out.append(
" has_preset_mode: ");
1776 out.append(YESNO(this->has_preset_mode));
1779 out.append(
" preset_mode: ");
1780 out.append(
"'").append(this->
preset_mode).append(
"'");
1792 this->legacy_supports_brightness = value.
as_bool();
1796 this->legacy_supports_rgb = value.
as_bool();
1800 this->legacy_supports_white_value = value.
as_bool();
1804 this->legacy_supports_color_temperature = value.
as_bool();
1808 this->disabled_by_default = value.
as_bool();
1834 this->effects.push_back(value.
as_string());
1852 this->min_mireds = value.
as_float();
1856 this->max_mireds = value.
as_float();
1868 for (
auto &it : this->supported_color_modes) {
1871 buffer.
encode_bool(5, this->legacy_supports_brightness);
1873 buffer.
encode_bool(7, this->legacy_supports_white_value);
1874 buffer.
encode_bool(8, this->legacy_supports_color_temperature);
1877 for (
auto &it : this->effects) {
1880 buffer.
encode_bool(13, this->disabled_by_default);
1884 #ifdef HAS_PROTO_MESSAGE_DUMP 1887 out.append(
"ListEntitiesLightResponse {\n");
1888 out.append(
" object_id: ");
1889 out.append(
"'").append(this->object_id).append(
"'");
1892 out.append(
" key: ");
1893 sprintf(buffer,
"%" PRIu32, this->key);
1897 out.append(
" name: ");
1898 out.append(
"'").append(this->
name).append(
"'");
1901 out.append(
" unique_id: ");
1902 out.append(
"'").append(this->unique_id).append(
"'");
1905 for (
const auto &it : this->supported_color_modes) {
1906 out.append(
" supported_color_modes: ");
1907 out.append(proto_enum_to_string<enums::ColorMode>(it));
1911 out.append(
" legacy_supports_brightness: ");
1912 out.append(YESNO(this->legacy_supports_brightness));
1915 out.append(
" legacy_supports_rgb: ");
1916 out.append(YESNO(this->legacy_supports_rgb));
1919 out.append(
" legacy_supports_white_value: ");
1920 out.append(YESNO(this->legacy_supports_white_value));
1923 out.append(
" legacy_supports_color_temperature: ");
1924 out.append(YESNO(this->legacy_supports_color_temperature));
1927 out.append(
" min_mireds: ");
1928 sprintf(buffer,
"%g", this->min_mireds);
1932 out.append(
" max_mireds: ");
1933 sprintf(buffer,
"%g", this->max_mireds);
1937 for (
const auto &it : this->effects) {
1938 out.append(
" effects: ");
1939 out.append(
"'").append(it).append(
"'");
1943 out.append(
" disabled_by_default: ");
1944 out.append(YESNO(this->disabled_by_default));
1947 out.append(
" icon: ");
1948 out.append(
"'").append(this->icon).append(
"'");
1951 out.append(
" entity_category: ");
1952 out.append(proto_enum_to_string<enums::EntityCategory>(this->entity_category));
1988 this->brightness = value.
as_float();
1992 this->color_brightness = value.
as_float();
2012 this->color_temperature = value.
as_float();
2016 this->cold_white = value.
as_float();
2020 this->warm_white = value.
as_float();
2042 #ifdef HAS_PROTO_MESSAGE_DUMP 2045 out.append(
"LightStateResponse {\n");
2046 out.append(
" key: ");
2047 sprintf(buffer,
"%" PRIu32, this->key);
2051 out.append(
" state: ");
2052 out.append(YESNO(this->
state));
2055 out.append(
" brightness: ");
2056 sprintf(buffer,
"%g", this->brightness);
2060 out.append(
" color_mode: ");
2061 out.append(proto_enum_to_string<enums::ColorMode>(this->color_mode));
2064 out.append(
" color_brightness: ");
2065 sprintf(buffer,
"%g", this->color_brightness);
2069 out.append(
" red: ");
2070 sprintf(buffer,
"%g", this->red);
2074 out.append(
" green: ");
2075 sprintf(buffer,
"%g", this->green);
2079 out.append(
" blue: ");
2080 sprintf(buffer,
"%g", this->blue);
2084 out.append(
" white: ");
2085 sprintf(buffer,
"%g", this->white);
2089 out.append(
" color_temperature: ");
2090 sprintf(buffer,
"%g", this->color_temperature);
2094 out.append(
" cold_white: ");
2095 sprintf(buffer,
"%g", this->cold_white);
2099 out.append(
" warm_white: ");
2100 sprintf(buffer,
"%g", this->warm_white);
2104 out.append(
" effect: ");
2105 out.append(
"'").append(this->effect).append(
"'");
2113 this->has_state = value.
as_bool();
2121 this->has_brightness = value.
as_bool();
2125 this->has_color_mode = value.
as_bool();
2133 this->has_color_brightness = value.
as_bool();
2137 this->has_rgb = value.
as_bool();
2141 this->has_white = value.
as_bool();
2145 this->has_color_temperature = value.
as_bool();
2149 this->has_cold_white = value.
as_bool();
2153 this->has_warm_white = value.
as_bool();
2157 this->has_transition_length = value.
as_bool();
2161 this->transition_length = value.
as_uint32();
2165 this->has_flash_length = value.
as_bool();
2173 this->has_effect = value.
as_bool();
2197 this->brightness = value.
as_float();
2201 this->color_brightness = value.
as_float();
2221 this->color_temperature = value.
as_float();
2225 this->cold_white = value.
as_float();
2229 this->warm_white = value.
as_float();
2244 buffer.
encode_bool(20, this->has_color_brightness);
2252 buffer.
encode_bool(12, this->has_color_temperature);
2258 buffer.
encode_bool(14, this->has_transition_length);
2265 #ifdef HAS_PROTO_MESSAGE_DUMP 2268 out.append(
"LightCommandRequest {\n");
2269 out.append(
" key: ");
2270 sprintf(buffer,
"%" PRIu32, this->key);
2274 out.append(
" has_state: ");
2275 out.append(YESNO(this->has_state));
2278 out.append(
" state: ");
2279 out.append(YESNO(this->
state));
2282 out.append(
" has_brightness: ");
2283 out.append(YESNO(this->has_brightness));
2286 out.append(
" brightness: ");
2287 sprintf(buffer,
"%g", this->brightness);
2291 out.append(
" has_color_mode: ");
2292 out.append(YESNO(this->has_color_mode));
2295 out.append(
" color_mode: ");
2296 out.append(proto_enum_to_string<enums::ColorMode>(this->color_mode));
2299 out.append(
" has_color_brightness: ");
2300 out.append(YESNO(this->has_color_brightness));
2303 out.append(
" color_brightness: ");
2304 sprintf(buffer,
"%g", this->color_brightness);
2308 out.append(
" has_rgb: ");
2309 out.append(YESNO(this->has_rgb));
2312 out.append(
" red: ");
2313 sprintf(buffer,
"%g", this->red);
2317 out.append(
" green: ");
2318 sprintf(buffer,
"%g", this->green);
2322 out.append(
" blue: ");
2323 sprintf(buffer,
"%g", this->blue);
2327 out.append(
" has_white: ");
2328 out.append(YESNO(this->has_white));
2331 out.append(
" white: ");
2332 sprintf(buffer,
"%g", this->white);
2336 out.append(
" has_color_temperature: ");
2337 out.append(YESNO(this->has_color_temperature));
2340 out.append(
" color_temperature: ");
2341 sprintf(buffer,
"%g", this->color_temperature);
2345 out.append(
" has_cold_white: ");
2346 out.append(YESNO(this->has_cold_white));
2349 out.append(
" cold_white: ");
2350 sprintf(buffer,
"%g", this->cold_white);
2354 out.append(
" has_warm_white: ");
2355 out.append(YESNO(this->has_warm_white));
2358 out.append(
" warm_white: ");
2359 sprintf(buffer,
"%g", this->warm_white);
2363 out.append(
" has_transition_length: ");
2364 out.append(YESNO(this->has_transition_length));
2367 out.append(
" transition_length: ");
2368 sprintf(buffer,
"%" PRIu32, this->transition_length);
2372 out.append(
" has_flash_length: ");
2373 out.append(YESNO(this->has_flash_length));
2376 out.append(
" flash_length: ");
2377 sprintf(buffer,
"%" PRIu32, this->flash_length);
2381 out.append(
" has_effect: ");
2382 out.append(YESNO(this->has_effect));
2385 out.append(
" effect: ");
2386 out.append(
"'").append(this->effect).append(
"'");
2394 this->accuracy_decimals = value.
as_int32();
2398 this->force_update = value.
as_bool();
2410 this->disabled_by_default = value.
as_bool();
2440 this->unit_of_measurement = value.
as_string();
2473 buffer.
encode_bool(12, this->disabled_by_default);
2476 #ifdef HAS_PROTO_MESSAGE_DUMP 2479 out.append(
"ListEntitiesSensorResponse {\n");
2480 out.append(
" object_id: ");
2481 out.append(
"'").append(this->object_id).append(
"'");
2484 out.append(
" key: ");
2485 sprintf(buffer,
"%" PRIu32, this->key);
2489 out.append(
" name: ");
2490 out.append(
"'").append(this->
name).append(
"'");
2493 out.append(
" unique_id: ");
2494 out.append(
"'").append(this->unique_id).append(
"'");
2497 out.append(
" icon: ");
2498 out.append(
"'").append(this->icon).append(
"'");
2501 out.append(
" unit_of_measurement: ");
2502 out.append(
"'").append(this->unit_of_measurement).append(
"'");
2505 out.append(
" accuracy_decimals: ");
2506 sprintf(buffer,
"%" PRId32, this->accuracy_decimals);
2510 out.append(
" force_update: ");
2511 out.append(YESNO(this->force_update));
2514 out.append(
" device_class: ");
2515 out.append(
"'").append(this->device_class).append(
"'");
2518 out.append(
" state_class: ");
2519 out.append(proto_enum_to_string<enums::SensorStateClass>(this->state_class));
2522 out.append(
" legacy_last_reset_type: ");
2523 out.append(proto_enum_to_string<enums::SensorLastResetType>(this->legacy_last_reset_type));
2526 out.append(
" disabled_by_default: ");
2527 out.append(YESNO(this->disabled_by_default));
2530 out.append(
" entity_category: ");
2531 out.append(proto_enum_to_string<enums::EntityCategory>(this->entity_category));
2539 this->missing_state = value.
as_bool();
2565 #ifdef HAS_PROTO_MESSAGE_DUMP 2568 out.append(
"SensorStateResponse {\n");
2569 out.append(
" key: ");
2570 sprintf(buffer,
"%" PRIu32, this->key);
2574 out.append(
" state: ");
2575 sprintf(buffer,
"%g", this->
state);
2579 out.append(
" missing_state: ");
2580 out.append(YESNO(this->missing_state));
2588 this->assumed_state = value.
as_bool();
2592 this->disabled_by_default = value.
as_bool();
2650 #ifdef HAS_PROTO_MESSAGE_DUMP 2653 out.append(
"ListEntitiesSwitchResponse {\n");
2654 out.append(
" object_id: ");
2655 out.append(
"'").append(this->object_id).append(
"'");
2658 out.append(
" key: ");
2659 sprintf(buffer,
"%" PRIu32, this->key);
2663 out.append(
" name: ");
2664 out.append(
"'").append(this->
name).append(
"'");
2667 out.append(
" unique_id: ");
2668 out.append(
"'").append(this->unique_id).append(
"'");
2671 out.append(
" icon: ");
2672 out.append(
"'").append(this->icon).append(
"'");
2675 out.append(
" assumed_state: ");
2676 out.append(YESNO(this->assumed_state));
2679 out.append(
" disabled_by_default: ");
2680 out.append(YESNO(this->disabled_by_default));
2683 out.append(
" entity_category: ");
2684 out.append(proto_enum_to_string<enums::EntityCategory>(this->entity_category));
2687 out.append(
" device_class: ");
2688 out.append(
"'").append(this->device_class).append(
"'");
2717 #ifdef HAS_PROTO_MESSAGE_DUMP 2720 out.append(
"SwitchStateResponse {\n");
2721 out.append(
" key: ");
2722 sprintf(buffer,
"%" PRIu32, this->key);
2726 out.append(
" state: ");
2727 out.append(YESNO(this->
state));
2756 #ifdef HAS_PROTO_MESSAGE_DUMP 2759 out.append(
"SwitchCommandRequest {\n");
2760 out.append(
" key: ");
2761 sprintf(buffer,
"%" PRIu32, this->key);
2765 out.append(
" state: ");
2766 out.append(YESNO(this->
state));
2774 this->disabled_by_default = value.
as_bool();
2831 #ifdef HAS_PROTO_MESSAGE_DUMP 2834 out.append(
"ListEntitiesTextSensorResponse {\n");
2835 out.append(
" object_id: ");
2836 out.append(
"'").append(this->object_id).append(
"'");
2839 out.append(
" key: ");
2840 sprintf(buffer,
"%" PRIu32, this->key);
2844 out.append(
" name: ");
2845 out.append(
"'").append(this->
name).append(
"'");
2848 out.append(
" unique_id: ");
2849 out.append(
"'").append(this->unique_id).append(
"'");
2852 out.append(
" icon: ");
2853 out.append(
"'").append(this->icon).append(
"'");
2856 out.append(
" disabled_by_default: ");
2857 out.append(YESNO(this->disabled_by_default));
2860 out.append(
" entity_category: ");
2861 out.append(proto_enum_to_string<enums::EntityCategory>(this->entity_category));
2864 out.append(
" device_class: ");
2865 out.append(
"'").append(this->device_class).append(
"'");
2873 this->missing_state = value.
as_bool();
2905 #ifdef HAS_PROTO_MESSAGE_DUMP 2908 out.append(
"TextSensorStateResponse {\n");
2909 out.append(
" key: ");
2910 sprintf(buffer,
"%" PRIu32, this->key);
2914 out.append(
" state: ");
2915 out.append(
"'").append(this->
state).append(
"'");
2918 out.append(
" missing_state: ");
2919 out.append(YESNO(this->missing_state));
2931 this->dump_config = value.
as_bool();
2942 #ifdef HAS_PROTO_MESSAGE_DUMP 2945 out.append(
"SubscribeLogsRequest {\n");
2946 out.append(
" level: ");
2947 out.append(proto_enum_to_string<enums::LogLevel>(this->level));
2950 out.append(
" dump_config: ");
2951 out.append(YESNO(this->dump_config));
2963 this->send_failed = value.
as_bool();
2985 #ifdef HAS_PROTO_MESSAGE_DUMP 2988 out.append(
"SubscribeLogsResponse {\n");
2989 out.append(
" level: ");
2990 out.append(proto_enum_to_string<enums::LogLevel>(this->level));
2993 out.append(
" message: ");
2994 out.append(
"'").append(this->message).append(
"'");
2997 out.append(
" send_failed: ");
2998 out.append(YESNO(this->send_failed));
3004 #ifdef HAS_PROTO_MESSAGE_DUMP 3006 out.append(
"SubscribeHomeassistantServicesRequest {}");
3027 #ifdef HAS_PROTO_MESSAGE_DUMP 3030 out.append(
"HomeassistantServiceMap {\n");
3031 out.append(
" key: ");
3032 out.append(
"'").append(this->key).append(
"'");
3035 out.append(
" value: ");
3036 out.append(
"'").append(this->value).append(
"'");
3044 this->is_event = value.
as_bool();
3075 for (
auto &it : this->data) {
3078 for (
auto &it : this->data_template) {
3081 for (
auto &it : this->variables) {
3086 #ifdef HAS_PROTO_MESSAGE_DUMP 3089 out.append(
"HomeassistantServiceResponse {\n");
3090 out.append(
" service: ");
3091 out.append(
"'").append(this->service).append(
"'");
3094 for (
const auto &it : this->data) {
3095 out.append(
" data: ");
3100 for (
const auto &it : this->data_template) {
3101 out.append(
" data_template: ");
3106 for (
const auto &it : this->variables) {
3107 out.append(
" variables: ");
3112 out.append(
" is_event: ");
3113 out.append(YESNO(this->is_event));
3119 #ifdef HAS_PROTO_MESSAGE_DUMP 3121 out.append(
"SubscribeHomeAssistantStatesRequest {}");
3153 #ifdef HAS_PROTO_MESSAGE_DUMP 3156 out.append(
"SubscribeHomeAssistantStateResponse {\n");
3157 out.append(
" entity_id: ");
3158 out.append(
"'").append(this->entity_id).append(
"'");
3161 out.append(
" attribute: ");
3162 out.append(
"'").append(this->attribute).append(
"'");
3165 out.append(
" once: ");
3166 out.append(YESNO(this->once));
3194 #ifdef HAS_PROTO_MESSAGE_DUMP 3197 out.append(
"HomeAssistantStateResponse {\n");
3198 out.append(
" entity_id: ");
3199 out.append(
"'").append(this->entity_id).append(
"'");
3202 out.append(
" state: ");
3203 out.append(
"'").append(this->
state).append(
"'");
3206 out.append(
" attribute: ");
3207 out.append(
"'").append(this->attribute).append(
"'");
3213 #ifdef HAS_PROTO_MESSAGE_DUMP 3227 #ifdef HAS_PROTO_MESSAGE_DUMP 3230 out.append(
"GetTimeResponse {\n");
3231 out.append(
" epoch_seconds: ");
3232 sprintf(buffer,
"%" PRIu32, this->epoch_seconds);
3262 #ifdef HAS_PROTO_MESSAGE_DUMP 3265 out.append(
"ListEntitiesServicesArgument {\n");
3266 out.append(
" name: ");
3267 out.append(
"'").append(this->
name).append(
"'");
3270 out.append(
" type: ");
3271 out.append(proto_enum_to_string<enums::ServiceArgType>(this->
type));
3303 for (
auto &it : this->args) {
3307 #ifdef HAS_PROTO_MESSAGE_DUMP 3310 out.append(
"ListEntitiesServicesResponse {\n");
3311 out.append(
" name: ");
3312 out.append(
"'").append(this->
name).append(
"'");
3315 out.append(
" key: ");
3316 sprintf(buffer,
"%" PRIu32, this->key);
3320 for (
const auto &it : this->args) {
3321 out.append(
" args: ");
3331 this->bool_ = value.
as_bool();
3335 this->legacy_int = value.
as_int32();
3343 this->bool_array.push_back(value.
as_bool());
3347 this->int_array.push_back(value.
as_sint32());
3361 this->string_array.push_back(value.
as_string());
3375 this->float_array.push_back(value.
as_float());
3388 for (
auto it : this->bool_array) {
3391 for (
auto &it : this->int_array) {
3394 for (
auto &it : this->float_array) {
3397 for (
auto &it : this->string_array) {
3401 #ifdef HAS_PROTO_MESSAGE_DUMP 3404 out.append(
"ExecuteServiceArgument {\n");
3405 out.append(
" bool_: ");
3406 out.append(YESNO(this->bool_));
3409 out.append(
" legacy_int: ");
3410 sprintf(buffer,
"%" PRId32, this->legacy_int);
3414 out.append(
" float_: ");
3415 sprintf(buffer,
"%g", this->float_);
3419 out.append(
" string_: ");
3420 out.append(
"'").append(this->string_).append(
"'");
3423 out.append(
" int_: ");
3424 sprintf(buffer,
"%" PRId32, this->int_);
3428 for (
const auto it : this->bool_array) {
3429 out.append(
" bool_array: ");
3430 out.append(YESNO(it));
3434 for (
const auto &it : this->int_array) {
3435 out.append(
" int_array: ");
3436 sprintf(buffer,
"%" PRId32, it);
3441 for (
const auto &it : this->float_array) {
3442 out.append(
" float_array: ");
3443 sprintf(buffer,
"%g", it);
3448 for (
const auto &it : this->string_array) {
3449 out.append(
" string_array: ");
3450 out.append(
"'").append(it).append(
"'");
3478 for (
auto &it : this->args) {
3482 #ifdef HAS_PROTO_MESSAGE_DUMP 3485 out.append(
"ExecuteServiceRequest {\n");
3486 out.append(
" key: ");
3487 sprintf(buffer,
"%" PRIu32, this->key);
3491 for (
const auto &it : this->args) {
3492 out.append(
" args: ");
3502 this->disabled_by_default = value.
as_bool();
3554 #ifdef HAS_PROTO_MESSAGE_DUMP 3557 out.append(
"ListEntitiesCameraResponse {\n");
3558 out.append(
" object_id: ");
3559 out.append(
"'").append(this->object_id).append(
"'");
3562 out.append(
" key: ");
3563 sprintf(buffer,
"%" PRIu32, this->key);
3567 out.append(
" name: ");
3568 out.append(
"'").append(this->
name).append(
"'");
3571 out.append(
" unique_id: ");
3572 out.append(
"'").append(this->unique_id).append(
"'");
3575 out.append(
" disabled_by_default: ");
3576 out.append(YESNO(this->disabled_by_default));
3579 out.append(
" icon: ");
3580 out.append(
"'").append(this->icon).append(
"'");
3583 out.append(
" entity_category: ");
3584 out.append(proto_enum_to_string<enums::EntityCategory>(this->entity_category));
3624 #ifdef HAS_PROTO_MESSAGE_DUMP 3627 out.append(
"CameraImageResponse {\n");
3628 out.append(
" key: ");
3629 sprintf(buffer,
"%" PRIu32, this->key);
3633 out.append(
" data: ");
3634 out.append(
"'").append(this->data).append(
"'");
3637 out.append(
" done: ");
3638 out.append(YESNO(this->done));
3646 this->single = value.
as_bool();
3650 this->stream = value.
as_bool();
3661 #ifdef HAS_PROTO_MESSAGE_DUMP 3664 out.append(
"CameraImageRequest {\n");
3665 out.append(
" single: ");
3666 out.append(YESNO(this->single));
3669 out.append(
" stream: ");
3670 out.append(YESNO(this->stream));
3678 this->supports_current_temperature = value.
as_bool();
3682 this->supports_two_point_target_temperature = value.
as_bool();
3690 this->legacy_supports_away = value.
as_bool();
3694 this->supports_action = value.
as_bool();
3710 this->disabled_by_default = value.
as_bool();
3718 this->supports_current_humidity = value.
as_bool();
3722 this->supports_target_humidity = value.
as_bool();
3744 this->supported_custom_fan_modes.push_back(value.
as_string());
3748 this->supported_custom_presets.push_back(value.
as_string());
3766 this->visual_min_temperature = value.
as_float();
3770 this->visual_max_temperature = value.
as_float();
3774 this->visual_target_temperature_step = value.
as_float();
3778 this->visual_current_temperature_step = value.
as_float();
3782 this->visual_min_humidity = value.
as_float();
3786 this->visual_max_humidity = value.
as_float();
3798 buffer.
encode_bool(5, this->supports_current_temperature);
3799 buffer.
encode_bool(6, this->supports_two_point_target_temperature);
3800 for (
auto &it : this->supported_modes) {
3805 buffer.
encode_float(10, this->visual_target_temperature_step);
3806 buffer.
encode_bool(11, this->legacy_supports_away);
3808 for (
auto &it : this->supported_fan_modes) {
3811 for (
auto &it : this->supported_swing_modes) {
3814 for (
auto &it : this->supported_custom_fan_modes) {
3817 for (
auto &it : this->supported_presets) {
3820 for (
auto &it : this->supported_custom_presets) {
3823 buffer.
encode_bool(18, this->disabled_by_default);
3826 buffer.
encode_float(21, this->visual_current_temperature_step);
3827 buffer.
encode_bool(22, this->supports_current_humidity);
3828 buffer.
encode_bool(23, this->supports_target_humidity);
3832 #ifdef HAS_PROTO_MESSAGE_DUMP 3835 out.append(
"ListEntitiesClimateResponse {\n");
3836 out.append(
" object_id: ");
3837 out.append(
"'").append(this->object_id).append(
"'");
3840 out.append(
" key: ");
3841 sprintf(buffer,
"%" PRIu32, this->key);
3845 out.append(
" name: ");
3846 out.append(
"'").append(this->
name).append(
"'");
3849 out.append(
" unique_id: ");
3850 out.append(
"'").append(this->unique_id).append(
"'");
3853 out.append(
" supports_current_temperature: ");
3854 out.append(YESNO(this->supports_current_temperature));
3857 out.append(
" supports_two_point_target_temperature: ");
3858 out.append(YESNO(this->supports_two_point_target_temperature));
3861 for (
const auto &it : this->supported_modes) {
3862 out.append(
" supported_modes: ");
3863 out.append(proto_enum_to_string<enums::ClimateMode>(it));
3867 out.append(
" visual_min_temperature: ");
3868 sprintf(buffer,
"%g", this->visual_min_temperature);
3872 out.append(
" visual_max_temperature: ");
3873 sprintf(buffer,
"%g", this->visual_max_temperature);
3877 out.append(
" visual_target_temperature_step: ");
3878 sprintf(buffer,
"%g", this->visual_target_temperature_step);
3882 out.append(
" legacy_supports_away: ");
3883 out.append(YESNO(this->legacy_supports_away));
3886 out.append(
" supports_action: ");
3887 out.append(YESNO(this->supports_action));
3890 for (
const auto &it : this->supported_fan_modes) {
3891 out.append(
" supported_fan_modes: ");
3892 out.append(proto_enum_to_string<enums::ClimateFanMode>(it));
3896 for (
const auto &it : this->supported_swing_modes) {
3897 out.append(
" supported_swing_modes: ");
3898 out.append(proto_enum_to_string<enums::ClimateSwingMode>(it));
3902 for (
const auto &it : this->supported_custom_fan_modes) {
3903 out.append(
" supported_custom_fan_modes: ");
3904 out.append(
"'").append(it).append(
"'");
3908 for (
const auto &it : this->supported_presets) {
3909 out.append(
" supported_presets: ");
3910 out.append(proto_enum_to_string<enums::ClimatePreset>(it));
3914 for (
const auto &it : this->supported_custom_presets) {
3915 out.append(
" supported_custom_presets: ");
3916 out.append(
"'").append(it).append(
"'");
3920 out.append(
" disabled_by_default: ");
3921 out.append(YESNO(this->disabled_by_default));
3924 out.append(
" icon: ");
3925 out.append(
"'").append(this->icon).append(
"'");
3928 out.append(
" entity_category: ");
3929 out.append(proto_enum_to_string<enums::EntityCategory>(this->entity_category));
3932 out.append(
" visual_current_temperature_step: ");
3933 sprintf(buffer,
"%g", this->visual_current_temperature_step);
3937 out.append(
" supports_current_humidity: ");
3938 out.append(YESNO(this->supports_current_humidity));
3941 out.append(
" supports_target_humidity: ");
3942 out.append(YESNO(this->supports_target_humidity));
3945 out.append(
" visual_min_humidity: ");
3946 sprintf(buffer,
"%g", this->visual_min_humidity);
3950 out.append(
" visual_max_humidity: ");
3951 sprintf(buffer,
"%g", this->visual_max_humidity);
3964 this->unused_legacy_away = value.
as_bool();
4008 this->current_temperature = value.
as_float();
4024 this->current_humidity = value.
as_float();
4052 #ifdef HAS_PROTO_MESSAGE_DUMP 4055 out.append(
"ClimateStateResponse {\n");
4056 out.append(
" key: ");
4057 sprintf(buffer,
"%" PRIu32, this->key);
4061 out.append(
" mode: ");
4062 out.append(proto_enum_to_string<enums::ClimateMode>(this->
mode));
4065 out.append(
" current_temperature: ");
4066 sprintf(buffer,
"%g", this->current_temperature);
4070 out.append(
" target_temperature: ");
4075 out.append(
" target_temperature_low: ");
4080 out.append(
" target_temperature_high: ");
4085 out.append(
" unused_legacy_away: ");
4086 out.append(YESNO(this->unused_legacy_away));
4089 out.append(
" action: ");
4090 out.append(proto_enum_to_string<enums::ClimateAction>(this->action));
4093 out.append(
" fan_mode: ");
4094 out.append(proto_enum_to_string<enums::ClimateFanMode>(this->
fan_mode));
4097 out.append(
" swing_mode: ");
4098 out.append(proto_enum_to_string<enums::ClimateSwingMode>(this->
swing_mode));
4101 out.append(
" custom_fan_mode: ");
4105 out.append(
" preset: ");
4106 out.append(proto_enum_to_string<enums::ClimatePreset>(this->
preset));
4109 out.append(
" custom_preset: ");
4113 out.append(
" current_humidity: ");
4114 sprintf(buffer,
"%g", this->current_humidity);
4118 out.append(
" target_humidity: ");
4128 this->has_mode = value.
as_bool();
4136 this->has_target_temperature = value.
as_bool();
4140 this->has_target_temperature_low = value.
as_bool();
4144 this->has_target_temperature_high = value.
as_bool();
4148 this->unused_has_legacy_away = value.
as_bool();
4152 this->unused_legacy_away = value.
as_bool();
4156 this->has_fan_mode = value.
as_bool();
4164 this->has_swing_mode = value.
as_bool();
4172 this->has_custom_fan_mode = value.
as_bool();
4176 this->has_preset = value.
as_bool();
4184 this->has_custom_preset = value.
as_bool();
4188 this->has_target_humidity = value.
as_bool();
4239 buffer.
encode_bool(4, this->has_target_temperature);
4241 buffer.
encode_bool(6, this->has_target_temperature_low);
4243 buffer.
encode_bool(8, this->has_target_temperature_high);
4245 buffer.
encode_bool(10, this->unused_has_legacy_away);
4251 buffer.
encode_bool(16, this->has_custom_fan_mode);
4257 buffer.
encode_bool(22, this->has_target_humidity);
4260 #ifdef HAS_PROTO_MESSAGE_DUMP 4263 out.append(
"ClimateCommandRequest {\n");
4264 out.append(
" key: ");
4265 sprintf(buffer,
"%" PRIu32, this->key);
4269 out.append(
" has_mode: ");
4270 out.append(YESNO(this->has_mode));
4273 out.append(
" mode: ");
4274 out.append(proto_enum_to_string<enums::ClimateMode>(this->
mode));
4277 out.append(
" has_target_temperature: ");
4278 out.append(YESNO(this->has_target_temperature));
4281 out.append(
" target_temperature: ");
4286 out.append(
" has_target_temperature_low: ");
4287 out.append(YESNO(this->has_target_temperature_low));
4290 out.append(
" target_temperature_low: ");
4295 out.append(
" has_target_temperature_high: ");
4296 out.append(YESNO(this->has_target_temperature_high));
4299 out.append(
" target_temperature_high: ");
4304 out.append(
" unused_has_legacy_away: ");
4305 out.append(YESNO(this->unused_has_legacy_away));
4308 out.append(
" unused_legacy_away: ");
4309 out.append(YESNO(this->unused_legacy_away));
4312 out.append(
" has_fan_mode: ");
4313 out.append(YESNO(this->has_fan_mode));
4316 out.append(
" fan_mode: ");
4317 out.append(proto_enum_to_string<enums::ClimateFanMode>(this->
fan_mode));
4320 out.append(
" has_swing_mode: ");
4321 out.append(YESNO(this->has_swing_mode));
4324 out.append(
" swing_mode: ");
4325 out.append(proto_enum_to_string<enums::ClimateSwingMode>(this->
swing_mode));
4328 out.append(
" has_custom_fan_mode: ");
4329 out.append(YESNO(this->has_custom_fan_mode));
4332 out.append(
" custom_fan_mode: ");
4336 out.append(
" has_preset: ");
4337 out.append(YESNO(this->has_preset));
4340 out.append(
" preset: ");
4341 out.append(proto_enum_to_string<enums::ClimatePreset>(this->
preset));
4344 out.append(
" has_custom_preset: ");
4345 out.append(YESNO(this->has_custom_preset));
4348 out.append(
" custom_preset: ");
4352 out.append(
" has_target_humidity: ");
4353 out.append(YESNO(this->has_target_humidity));
4356 out.append(
" target_humidity: ");
4366 this->disabled_by_default = value.
as_bool();
4400 this->unit_of_measurement = value.
as_string();
4418 this->min_value = value.
as_float();
4422 this->max_value = value.
as_float();
4448 #ifdef HAS_PROTO_MESSAGE_DUMP 4451 out.append(
"ListEntitiesNumberResponse {\n");
4452 out.append(
" object_id: ");
4453 out.append(
"'").append(this->object_id).append(
"'");
4456 out.append(
" key: ");
4457 sprintf(buffer,
"%" PRIu32, this->key);
4461 out.append(
" name: ");
4462 out.append(
"'").append(this->
name).append(
"'");
4465 out.append(
" unique_id: ");
4466 out.append(
"'").append(this->unique_id).append(
"'");
4469 out.append(
" icon: ");
4470 out.append(
"'").append(this->icon).append(
"'");
4473 out.append(
" min_value: ");
4474 sprintf(buffer,
"%g", this->min_value);
4478 out.append(
" max_value: ");
4479 sprintf(buffer,
"%g", this->max_value);
4483 out.append(
" step: ");
4484 sprintf(buffer,
"%g", this->step);
4488 out.append(
" disabled_by_default: ");
4489 out.append(YESNO(this->disabled_by_default));
4492 out.append(
" entity_category: ");
4493 out.append(proto_enum_to_string<enums::EntityCategory>(this->entity_category));
4496 out.append(
" unit_of_measurement: ");
4497 out.append(
"'").append(this->unit_of_measurement).append(
"'");
4500 out.append(
" mode: ");
4501 out.append(proto_enum_to_string<enums::NumberMode>(this->
mode));
4504 out.append(
" device_class: ");
4505 out.append(
"'").append(this->device_class).append(
"'");
4513 this->missing_state = value.
as_bool();
4539 #ifdef HAS_PROTO_MESSAGE_DUMP 4542 out.append(
"NumberStateResponse {\n");
4543 out.append(
" key: ");
4544 sprintf(buffer,
"%" PRIu32, this->key);
4548 out.append(
" state: ");
4549 sprintf(buffer,
"%g", this->
state);
4553 out.append(
" missing_state: ");
4554 out.append(YESNO(this->missing_state));
4577 #ifdef HAS_PROTO_MESSAGE_DUMP 4580 out.append(
"NumberCommandRequest {\n");
4581 out.append(
" key: ");
4582 sprintf(buffer,
"%" PRIu32, this->key);
4586 out.append(
" state: ");
4587 sprintf(buffer,
"%g", this->
state);
4596 this->disabled_by_default = value.
as_bool();
4649 for (
auto &it : this->
options) {
4655 #ifdef HAS_PROTO_MESSAGE_DUMP 4658 out.append(
"ListEntitiesSelectResponse {\n");
4659 out.append(
" object_id: ");
4660 out.append(
"'").append(this->object_id).append(
"'");
4663 out.append(
" key: ");
4664 sprintf(buffer,
"%" PRIu32, this->key);
4668 out.append(
" name: ");
4669 out.append(
"'").append(this->
name).append(
"'");
4672 out.append(
" unique_id: ");
4673 out.append(
"'").append(this->unique_id).append(
"'");
4676 out.append(
" icon: ");
4677 out.append(
"'").append(this->icon).append(
"'");
4680 for (
const auto &it : this->
options) {
4681 out.append(
" options: ");
4682 out.append(
"'").append(it).append(
"'");
4686 out.append(
" disabled_by_default: ");
4687 out.append(YESNO(this->disabled_by_default));
4690 out.append(
" entity_category: ");
4691 out.append(proto_enum_to_string<enums::EntityCategory>(this->entity_category));
4699 this->missing_state = value.
as_bool();
4731 #ifdef HAS_PROTO_MESSAGE_DUMP 4734 out.append(
"SelectStateResponse {\n");
4735 out.append(
" key: ");
4736 sprintf(buffer,
"%" PRIu32, this->key);
4740 out.append(
" state: ");
4741 out.append(
"'").append(this->
state).append(
"'");
4744 out.append(
" missing_state: ");
4745 out.append(YESNO(this->missing_state));
4774 #ifdef HAS_PROTO_MESSAGE_DUMP 4777 out.append(
"SelectCommandRequest {\n");
4778 out.append(
" key: ");
4779 sprintf(buffer,
"%" PRIu32, this->key);
4783 out.append(
" state: ");
4784 out.append(
"'").append(this->
state).append(
"'");
4792 this->disabled_by_default = value.
as_bool();
4800 this->assumed_state = value.
as_bool();
4804 this->supports_open = value.
as_bool();
4808 this->requires_code = value.
as_bool();
4864 #ifdef HAS_PROTO_MESSAGE_DUMP 4867 out.append(
"ListEntitiesLockResponse {\n");
4868 out.append(
" object_id: ");
4869 out.append(
"'").append(this->object_id).append(
"'");
4872 out.append(
" key: ");
4873 sprintf(buffer,
"%" PRIu32, this->key);
4877 out.append(
" name: ");
4878 out.append(
"'").append(this->
name).append(
"'");
4881 out.append(
" unique_id: ");
4882 out.append(
"'").append(this->unique_id).append(
"'");
4885 out.append(
" icon: ");
4886 out.append(
"'").append(this->icon).append(
"'");
4889 out.append(
" disabled_by_default: ");
4890 out.append(YESNO(this->disabled_by_default));
4893 out.append(
" entity_category: ");
4894 out.append(proto_enum_to_string<enums::EntityCategory>(this->entity_category));
4897 out.append(
" assumed_state: ");
4898 out.append(YESNO(this->assumed_state));
4901 out.append(
" supports_open: ");
4902 out.append(YESNO(this->supports_open));
4905 out.append(
" requires_code: ");
4906 out.append(YESNO(this->requires_code));
4909 out.append(
" code_format: ");
4910 out.append(
"'").append(this->code_format).append(
"'");
4939 #ifdef HAS_PROTO_MESSAGE_DUMP 4942 out.append(
"LockStateResponse {\n");
4943 out.append(
" key: ");
4944 sprintf(buffer,
"%" PRIu32, this->key);
4948 out.append(
" state: ");
4949 out.append(proto_enum_to_string<enums::LockState>(this->
state));
4961 this->has_code = value.
as_bool();
4994 #ifdef HAS_PROTO_MESSAGE_DUMP 4997 out.append(
"LockCommandRequest {\n");
4998 out.append(
" key: ");
4999 sprintf(buffer,
"%" PRIu32, this->key);
5003 out.append(
" command: ");
5004 out.append(proto_enum_to_string<enums::LockCommand>(this->command));
5007 out.append(
" has_code: ");
5008 out.append(YESNO(this->has_code));
5011 out.append(
" code: ");
5012 out.append(
"'").append(this->code).append(
"'");
5020 this->disabled_by_default = value.
as_bool();
5077 #ifdef HAS_PROTO_MESSAGE_DUMP 5080 out.append(
"ListEntitiesButtonResponse {\n");
5081 out.append(
" object_id: ");
5082 out.append(
"'").append(this->object_id).append(
"'");
5085 out.append(
" key: ");
5086 sprintf(buffer,
"%" PRIu32, this->key);
5090 out.append(
" name: ");
5091 out.append(
"'").append(this->
name).append(
"'");
5094 out.append(
" unique_id: ");
5095 out.append(
"'").append(this->unique_id).append(
"'");
5098 out.append(
" icon: ");
5099 out.append(
"'").append(this->icon).append(
"'");
5102 out.append(
" disabled_by_default: ");
5103 out.append(YESNO(this->disabled_by_default));
5106 out.append(
" entity_category: ");
5107 out.append(proto_enum_to_string<enums::EntityCategory>(this->entity_category));
5110 out.append(
" device_class: ");
5111 out.append(
"'").append(this->device_class).append(
"'");
5127 #ifdef HAS_PROTO_MESSAGE_DUMP 5130 out.append(
"ButtonCommandRequest {\n");
5131 out.append(
" key: ");
5132 sprintf(buffer,
"%" PRIu32, this->key);
5177 #ifdef HAS_PROTO_MESSAGE_DUMP 5180 out.append(
"MediaPlayerSupportedFormat {\n");
5181 out.append(
" format: ");
5182 out.append(
"'").append(this->format).append(
"'");
5185 out.append(
" sample_rate: ");
5186 sprintf(buffer,
"%" PRIu32, this->sample_rate);
5190 out.append(
" num_channels: ");
5191 sprintf(buffer,
"%" PRIu32, this->num_channels);
5195 out.append(
" purpose: ");
5196 out.append(proto_enum_to_string<enums::MediaPlayerFormatPurpose>(this->purpose));
5199 out.append(
" sample_bytes: ");
5200 sprintf(buffer,
"%" PRIu32, this->sample_bytes);
5209 this->disabled_by_default = value.
as_bool();
5217 this->supports_pause = value.
as_bool();
5269 for (
auto &it : this->supported_formats) {
5273 #ifdef HAS_PROTO_MESSAGE_DUMP 5276 out.append(
"ListEntitiesMediaPlayerResponse {\n");
5277 out.append(
" object_id: ");
5278 out.append(
"'").append(this->object_id).append(
"'");
5281 out.append(
" key: ");
5282 sprintf(buffer,
"%" PRIu32, this->key);
5286 out.append(
" name: ");
5287 out.append(
"'").append(this->
name).append(
"'");
5290 out.append(
" unique_id: ");
5291 out.append(
"'").append(this->unique_id).append(
"'");
5294 out.append(
" icon: ");
5295 out.append(
"'").append(this->icon).append(
"'");
5298 out.append(
" disabled_by_default: ");
5299 out.append(YESNO(this->disabled_by_default));
5302 out.append(
" entity_category: ");
5303 out.append(proto_enum_to_string<enums::EntityCategory>(this->entity_category));
5306 out.append(
" supports_pause: ");
5307 out.append(YESNO(this->supports_pause));
5310 for (
const auto &it : this->supported_formats) {
5311 out.append(
" supported_formats: ");
5325 this->muted = value.
as_bool();
5352 #ifdef HAS_PROTO_MESSAGE_DUMP 5355 out.append(
"MediaPlayerStateResponse {\n");
5356 out.append(
" key: ");
5357 sprintf(buffer,
"%" PRIu32, this->key);
5361 out.append(
" state: ");
5362 out.append(proto_enum_to_string<enums::MediaPlayerState>(this->
state));
5365 out.append(
" volume: ");
5366 sprintf(buffer,
"%g", this->volume);
5370 out.append(
" muted: ");
5371 out.append(YESNO(this->muted));
5379 this->has_command = value.
as_bool();
5387 this->has_volume = value.
as_bool();
5391 this->has_media_url = value.
as_bool();
5395 this->has_announcement = value.
as_bool();
5399 this->announcement = value.
as_bool();
5441 #ifdef HAS_PROTO_MESSAGE_DUMP 5444 out.append(
"MediaPlayerCommandRequest {\n");
5445 out.append(
" key: ");
5446 sprintf(buffer,
"%" PRIu32, this->key);
5450 out.append(
" has_command: ");
5451 out.append(YESNO(this->has_command));
5454 out.append(
" command: ");
5455 out.append(proto_enum_to_string<enums::MediaPlayerCommand>(this->command));
5458 out.append(
" has_volume: ");
5459 out.append(YESNO(this->has_volume));
5462 out.append(
" volume: ");
5463 sprintf(buffer,
"%g", this->volume);
5467 out.append(
" has_media_url: ");
5468 out.append(YESNO(this->has_media_url));
5471 out.append(
" media_url: ");
5472 out.append(
"'").append(this->media_url).append(
"'");
5475 out.append(
" has_announcement: ");
5476 out.append(YESNO(this->has_announcement));
5479 out.append(
" announcement: ");
5480 out.append(YESNO(this->announcement));
5498 #ifdef HAS_PROTO_MESSAGE_DUMP 5501 out.append(
"SubscribeBluetoothLEAdvertisementsRequest {\n");
5502 out.append(
" flags: ");
5503 sprintf(buffer,
"%" PRIu32, this->
flags);
5512 this->legacy_data.push_back(value.
as_uint32());
5535 for (
auto &it : this->legacy_data) {
5540 #ifdef HAS_PROTO_MESSAGE_DUMP 5543 out.append(
"BluetoothServiceData {\n");
5544 out.append(
" uuid: ");
5545 out.append(
"'").append(this->uuid).append(
"'");
5548 for (
const auto &it : this->legacy_data) {
5549 out.append(
" legacy_data: ");
5550 sprintf(buffer,
"%" PRIu32, it);
5555 out.append(
" data: ");
5556 out.append(
"'").append(this->data).append(
"'");
5586 this->service_uuids.push_back(value.
as_string());
5605 for (
auto &it : this->service_uuids) {
5608 for (
auto &it : this->service_data) {
5611 for (
auto &it : this->manufacturer_data) {
5616 #ifdef HAS_PROTO_MESSAGE_DUMP 5619 out.append(
"BluetoothLEAdvertisementResponse {\n");
5620 out.append(
" address: ");
5621 sprintf(buffer,
"%llu", this->
address);
5625 out.append(
" name: ");
5626 out.append(
"'").append(this->
name).append(
"'");
5629 out.append(
" rssi: ");
5630 sprintf(buffer,
"%" PRId32, this->rssi);
5634 for (
const auto &it : this->service_uuids) {
5635 out.append(
" service_uuids: ");
5636 out.append(
"'").append(it).append(
"'");
5640 for (
const auto &it : this->service_data) {
5641 out.append(
" service_data: ");
5646 for (
const auto &it : this->manufacturer_data) {
5647 out.append(
" manufacturer_data: ");
5652 out.append(
" address_type: ");
5653 sprintf(buffer,
"%" PRIu32, this->address_type);
5693 #ifdef HAS_PROTO_MESSAGE_DUMP 5696 out.append(
"BluetoothLERawAdvertisement {\n");
5697 out.append(
" address: ");
5698 sprintf(buffer,
"%llu", this->
address);
5702 out.append(
" rssi: ");
5703 sprintf(buffer,
"%" PRId32, this->rssi);
5707 out.append(
" address_type: ");
5708 sprintf(buffer,
"%" PRIu32, this->address_type);
5712 out.append(
" data: ");
5713 out.append(
"'").append(this->data).append(
"'");
5729 for (
auto &it : this->advertisements) {
5733 #ifdef HAS_PROTO_MESSAGE_DUMP 5736 out.append(
"BluetoothLERawAdvertisementsResponse {\n");
5737 for (
const auto &it : this->advertisements) {
5738 out.append(
" advertisements: ");
5756 this->has_address_type = value.
as_bool();
5773 #ifdef HAS_PROTO_MESSAGE_DUMP 5776 out.append(
"BluetoothDeviceRequest {\n");
5777 out.append(
" address: ");
5778 sprintf(buffer,
"%llu", this->
address);
5782 out.append(
" request_type: ");
5783 out.append(proto_enum_to_string<enums::BluetoothDeviceRequestType>(this->request_type));
5786 out.append(
" has_address_type: ");
5787 out.append(YESNO(this->has_address_type));