esphome 2025.7.0b1__py3-none-any.whl → 2025.7.0b2__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 (49) hide show
  1. esphome/components/api/__init__.py +19 -5
  2. esphome/components/api/api_connection.cpp +53 -175
  3. esphome/components/api/api_connection.h +28 -25
  4. esphome/components/api/api_frame_helper.cpp +2 -3
  5. esphome/components/api/api_frame_helper.h +7 -9
  6. esphome/components/api/api_pb2.cpp +1862 -5133
  7. esphome/components/api/api_pb2.h +291 -533
  8. esphome/components/api/api_pb2_dump.cpp +99 -0
  9. esphome/components/api/api_pb2_service.cpp +4 -0
  10. esphome/components/api/api_pb2_service.h +6 -0
  11. esphome/components/api/api_server.cpp +2 -9
  12. esphome/components/api/api_server.h +7 -33
  13. esphome/components/api/custom_api_device.h +8 -0
  14. esphome/components/api/list_entities.cpp +2 -0
  15. esphome/components/api/list_entities.h +3 -1
  16. esphome/components/api/proto.h +506 -23
  17. esphome/components/api/user_services.h +2 -0
  18. esphome/components/debug/debug_esp32.cpp +2 -0
  19. esphome/components/esp32/__init__.py +1 -0
  20. esphome/components/esp32_camera/__init__.py +1 -1
  21. esphome/components/esp32_touch/esp32_touch_v1.cpp +12 -10
  22. esphome/components/esp8266/__init__.py +1 -0
  23. esphome/components/host/__init__.py +1 -0
  24. esphome/components/ld2410/ld2410.cpp +12 -28
  25. esphome/components/libretiny/__init__.py +1 -0
  26. esphome/components/mqtt/mqtt_backend_esp32.cpp +6 -2
  27. esphome/components/packet_transport/packet_transport.cpp +3 -0
  28. esphome/components/rp2040/__init__.py +1 -0
  29. esphome/components/sx126x/__init__.py +3 -3
  30. esphome/components/sx127x/__init__.py +2 -2
  31. esphome/components/usb_host/usb_host_client.cpp +10 -10
  32. esphome/components/usb_uart/cp210x.cpp +1 -1
  33. esphome/components/usb_uart/usb_uart.cpp +41 -44
  34. esphome/components/usb_uart/usb_uart.h +4 -3
  35. esphome/const.py +1 -1
  36. esphome/core/component_iterator.cpp +4 -2
  37. esphome/core/component_iterator.h +3 -3
  38. esphome/core/defines.h +1 -1
  39. esphome/core/entity_helpers.py +6 -0
  40. esphome/core/scheduler.cpp +9 -12
  41. esphome/core/scheduler.h +0 -3
  42. esphome/wizard.py +1 -1
  43. {esphome-2025.7.0b1.dist-info → esphome-2025.7.0b2.dist-info}/METADATA +2 -2
  44. {esphome-2025.7.0b1.dist-info → esphome-2025.7.0b2.dist-info}/RECORD +48 -49
  45. esphome/components/api/api_pb2_size.h +0 -359
  46. {esphome-2025.7.0b1.dist-info → esphome-2025.7.0b2.dist-info}/WHEEL +0 -0
  47. {esphome-2025.7.0b1.dist-info → esphome-2025.7.0b2.dist-info}/entry_points.txt +0 -0
  48. {esphome-2025.7.0b1.dist-info → esphome-2025.7.0b2.dist-info}/licenses/LICENSE +0 -0
  49. {esphome-2025.7.0b1.dist-info → esphome-2025.7.0b2.dist-info}/top_level.txt +0 -0
@@ -5,7 +5,6 @@
5
5
  #include "esphome/core/defines.h"
6
6
 
7
7
  #include "proto.h"
8
- #include "api_pb2_size.h"
9
8
 
10
9
  namespace esphome {
11
10
  namespace api {
@@ -82,6 +81,7 @@ enum LogLevel : uint32_t {
82
81
  LOG_LEVEL_VERBOSE = 6,
83
82
  LOG_LEVEL_VERY_VERBOSE = 7,
84
83
  };
84
+ #ifdef USE_API_SERVICES
85
85
  enum ServiceArgType : uint32_t {
86
86
  SERVICE_ARG_TYPE_BOOL = 0,
87
87
  SERVICE_ARG_TYPE_INT = 1,
@@ -92,6 +92,7 @@ enum ServiceArgType : uint32_t {
92
92
  SERVICE_ARG_TYPE_FLOAT_ARRAY = 6,
93
93
  SERVICE_ARG_TYPE_STRING_ARRAY = 7,
94
94
  };
95
+ #endif
95
96
  #ifdef USE_CLIMATE
96
97
  enum ClimateMode : uint32_t {
97
98
  CLIMATE_MODE_OFF = 0,
@@ -307,18 +308,25 @@ class StateResponseProtoMessage : public ProtoMessage {
307
308
 
308
309
  protected:
309
310
  };
311
+
312
+ class CommandProtoMessage : public ProtoMessage {
313
+ public:
314
+ ~CommandProtoMessage() override = default;
315
+ uint32_t key{0};
316
+ uint32_t device_id{0};
317
+
318
+ protected:
319
+ };
310
320
  class HelloRequest : public ProtoMessage {
311
321
  public:
312
- static constexpr uint16_t MESSAGE_TYPE = 1;
313
- static constexpr uint16_t ESTIMATED_SIZE = 17;
322
+ static constexpr uint8_t MESSAGE_TYPE = 1;
323
+ static constexpr uint8_t ESTIMATED_SIZE = 17;
314
324
  #ifdef HAS_PROTO_MESSAGE_DUMP
315
325
  const char *message_name() const override { return "hello_request"; }
316
326
  #endif
317
327
  std::string client_info{};
318
328
  uint32_t api_version_major{0};
319
329
  uint32_t api_version_minor{0};
320
- void encode(ProtoWriteBuffer buffer) const override;
321
- void calculate_size(uint32_t &total_size) const override;
322
330
  #ifdef HAS_PROTO_MESSAGE_DUMP
323
331
  void dump_to(std::string &out) const override;
324
332
  #endif
@@ -329,8 +337,8 @@ class HelloRequest : public ProtoMessage {
329
337
  };
330
338
  class HelloResponse : public ProtoMessage {
331
339
  public:
332
- static constexpr uint16_t MESSAGE_TYPE = 2;
333
- static constexpr uint16_t ESTIMATED_SIZE = 26;
340
+ static constexpr uint8_t MESSAGE_TYPE = 2;
341
+ static constexpr uint8_t ESTIMATED_SIZE = 26;
334
342
  #ifdef HAS_PROTO_MESSAGE_DUMP
335
343
  const char *message_name() const override { return "hello_response"; }
336
344
  #endif
@@ -345,19 +353,15 @@ class HelloResponse : public ProtoMessage {
345
353
  #endif
346
354
 
347
355
  protected:
348
- bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override;
349
- bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
350
356
  };
351
357
  class ConnectRequest : public ProtoMessage {
352
358
  public:
353
- static constexpr uint16_t MESSAGE_TYPE = 3;
354
- static constexpr uint16_t ESTIMATED_SIZE = 9;
359
+ static constexpr uint8_t MESSAGE_TYPE = 3;
360
+ static constexpr uint8_t ESTIMATED_SIZE = 9;
355
361
  #ifdef HAS_PROTO_MESSAGE_DUMP
356
362
  const char *message_name() const override { return "connect_request"; }
357
363
  #endif
358
364
  std::string password{};
359
- void encode(ProtoWriteBuffer buffer) const override;
360
- void calculate_size(uint32_t &total_size) const override;
361
365
  #ifdef HAS_PROTO_MESSAGE_DUMP
362
366
  void dump_to(std::string &out) const override;
363
367
  #endif
@@ -367,8 +371,8 @@ class ConnectRequest : public ProtoMessage {
367
371
  };
368
372
  class ConnectResponse : public ProtoMessage {
369
373
  public:
370
- static constexpr uint16_t MESSAGE_TYPE = 4;
371
- static constexpr uint16_t ESTIMATED_SIZE = 2;
374
+ static constexpr uint8_t MESSAGE_TYPE = 4;
375
+ static constexpr uint8_t ESTIMATED_SIZE = 2;
372
376
  #ifdef HAS_PROTO_MESSAGE_DUMP
373
377
  const char *message_name() const override { return "connect_response"; }
374
378
  #endif
@@ -380,12 +384,11 @@ class ConnectResponse : public ProtoMessage {
380
384
  #endif
381
385
 
382
386
  protected:
383
- bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
384
387
  };
385
388
  class DisconnectRequest : public ProtoMessage {
386
389
  public:
387
- static constexpr uint16_t MESSAGE_TYPE = 5;
388
- static constexpr uint16_t ESTIMATED_SIZE = 0;
390
+ static constexpr uint8_t MESSAGE_TYPE = 5;
391
+ static constexpr uint8_t ESTIMATED_SIZE = 0;
389
392
  #ifdef HAS_PROTO_MESSAGE_DUMP
390
393
  const char *message_name() const override { return "disconnect_request"; }
391
394
  #endif
@@ -397,8 +400,8 @@ class DisconnectRequest : public ProtoMessage {
397
400
  };
398
401
  class DisconnectResponse : public ProtoMessage {
399
402
  public:
400
- static constexpr uint16_t MESSAGE_TYPE = 6;
401
- static constexpr uint16_t ESTIMATED_SIZE = 0;
403
+ static constexpr uint8_t MESSAGE_TYPE = 6;
404
+ static constexpr uint8_t ESTIMATED_SIZE = 0;
402
405
  #ifdef HAS_PROTO_MESSAGE_DUMP
403
406
  const char *message_name() const override { return "disconnect_response"; }
404
407
  #endif
@@ -410,8 +413,8 @@ class DisconnectResponse : public ProtoMessage {
410
413
  };
411
414
  class PingRequest : public ProtoMessage {
412
415
  public:
413
- static constexpr uint16_t MESSAGE_TYPE = 7;
414
- static constexpr uint16_t ESTIMATED_SIZE = 0;
416
+ static constexpr uint8_t MESSAGE_TYPE = 7;
417
+ static constexpr uint8_t ESTIMATED_SIZE = 0;
415
418
  #ifdef HAS_PROTO_MESSAGE_DUMP
416
419
  const char *message_name() const override { return "ping_request"; }
417
420
  #endif
@@ -423,8 +426,8 @@ class PingRequest : public ProtoMessage {
423
426
  };
424
427
  class PingResponse : public ProtoMessage {
425
428
  public:
426
- static constexpr uint16_t MESSAGE_TYPE = 8;
427
- static constexpr uint16_t ESTIMATED_SIZE = 0;
429
+ static constexpr uint8_t MESSAGE_TYPE = 8;
430
+ static constexpr uint8_t ESTIMATED_SIZE = 0;
428
431
  #ifdef HAS_PROTO_MESSAGE_DUMP
429
432
  const char *message_name() const override { return "ping_response"; }
430
433
  #endif
@@ -436,8 +439,8 @@ class PingResponse : public ProtoMessage {
436
439
  };
437
440
  class DeviceInfoRequest : public ProtoMessage {
438
441
  public:
439
- static constexpr uint16_t MESSAGE_TYPE = 9;
440
- static constexpr uint16_t ESTIMATED_SIZE = 0;
442
+ static constexpr uint8_t MESSAGE_TYPE = 9;
443
+ static constexpr uint8_t ESTIMATED_SIZE = 0;
441
444
  #ifdef HAS_PROTO_MESSAGE_DUMP
442
445
  const char *message_name() const override { return "device_info_request"; }
443
446
  #endif
@@ -478,8 +481,8 @@ class DeviceInfo : public ProtoMessage {
478
481
  };
479
482
  class DeviceInfoResponse : public ProtoMessage {
480
483
  public:
481
- static constexpr uint16_t MESSAGE_TYPE = 10;
482
- static constexpr uint16_t ESTIMATED_SIZE = 219;
484
+ static constexpr uint8_t MESSAGE_TYPE = 10;
485
+ static constexpr uint8_t ESTIMATED_SIZE = 219;
483
486
  #ifdef HAS_PROTO_MESSAGE_DUMP
484
487
  const char *message_name() const override { return "device_info_response"; }
485
488
  #endif
@@ -512,13 +515,11 @@ class DeviceInfoResponse : public ProtoMessage {
512
515
  #endif
513
516
 
514
517
  protected:
515
- bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override;
516
- bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
517
518
  };
518
519
  class ListEntitiesRequest : public ProtoMessage {
519
520
  public:
520
- static constexpr uint16_t MESSAGE_TYPE = 11;
521
- static constexpr uint16_t ESTIMATED_SIZE = 0;
521
+ static constexpr uint8_t MESSAGE_TYPE = 11;
522
+ static constexpr uint8_t ESTIMATED_SIZE = 0;
522
523
  #ifdef HAS_PROTO_MESSAGE_DUMP
523
524
  const char *message_name() const override { return "list_entities_request"; }
524
525
  #endif
@@ -530,8 +531,8 @@ class ListEntitiesRequest : public ProtoMessage {
530
531
  };
531
532
  class ListEntitiesDoneResponse : public ProtoMessage {
532
533
  public:
533
- static constexpr uint16_t MESSAGE_TYPE = 19;
534
- static constexpr uint16_t ESTIMATED_SIZE = 0;
534
+ static constexpr uint8_t MESSAGE_TYPE = 19;
535
+ static constexpr uint8_t ESTIMATED_SIZE = 0;
535
536
  #ifdef HAS_PROTO_MESSAGE_DUMP
536
537
  const char *message_name() const override { return "list_entities_done_response"; }
537
538
  #endif
@@ -543,8 +544,8 @@ class ListEntitiesDoneResponse : public ProtoMessage {
543
544
  };
544
545
  class SubscribeStatesRequest : public ProtoMessage {
545
546
  public:
546
- static constexpr uint16_t MESSAGE_TYPE = 20;
547
- static constexpr uint16_t ESTIMATED_SIZE = 0;
547
+ static constexpr uint8_t MESSAGE_TYPE = 20;
548
+ static constexpr uint8_t ESTIMATED_SIZE = 0;
548
549
  #ifdef HAS_PROTO_MESSAGE_DUMP
549
550
  const char *message_name() const override { return "subscribe_states_request"; }
550
551
  #endif
@@ -557,8 +558,8 @@ class SubscribeStatesRequest : public ProtoMessage {
557
558
  #ifdef USE_BINARY_SENSOR
558
559
  class ListEntitiesBinarySensorResponse : public InfoResponseProtoMessage {
559
560
  public:
560
- static constexpr uint16_t MESSAGE_TYPE = 12;
561
- static constexpr uint16_t ESTIMATED_SIZE = 60;
561
+ static constexpr uint8_t MESSAGE_TYPE = 12;
562
+ static constexpr uint8_t ESTIMATED_SIZE = 60;
562
563
  #ifdef HAS_PROTO_MESSAGE_DUMP
563
564
  const char *message_name() const override { return "list_entities_binary_sensor_response"; }
564
565
  #endif
@@ -571,14 +572,11 @@ class ListEntitiesBinarySensorResponse : public InfoResponseProtoMessage {
571
572
  #endif
572
573
 
573
574
  protected:
574
- bool decode_32bit(uint32_t field_id, Proto32Bit value) override;
575
- bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override;
576
- bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
577
575
  };
578
576
  class BinarySensorStateResponse : public StateResponseProtoMessage {
579
577
  public:
580
- static constexpr uint16_t MESSAGE_TYPE = 21;
581
- static constexpr uint16_t ESTIMATED_SIZE = 13;
578
+ static constexpr uint8_t MESSAGE_TYPE = 21;
579
+ static constexpr uint8_t ESTIMATED_SIZE = 13;
582
580
  #ifdef HAS_PROTO_MESSAGE_DUMP
583
581
  const char *message_name() const override { return "binary_sensor_state_response"; }
584
582
  #endif
@@ -591,15 +589,13 @@ class BinarySensorStateResponse : public StateResponseProtoMessage {
591
589
  #endif
592
590
 
593
591
  protected:
594
- bool decode_32bit(uint32_t field_id, Proto32Bit value) override;
595
- bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
596
592
  };
597
593
  #endif
598
594
  #ifdef USE_COVER
599
595
  class ListEntitiesCoverResponse : public InfoResponseProtoMessage {
600
596
  public:
601
- static constexpr uint16_t MESSAGE_TYPE = 13;
602
- static constexpr uint16_t ESTIMATED_SIZE = 66;
597
+ static constexpr uint8_t MESSAGE_TYPE = 13;
598
+ static constexpr uint8_t ESTIMATED_SIZE = 66;
603
599
  #ifdef HAS_PROTO_MESSAGE_DUMP
604
600
  const char *message_name() const override { return "list_entities_cover_response"; }
605
601
  #endif
@@ -615,14 +611,11 @@ class ListEntitiesCoverResponse : public InfoResponseProtoMessage {
615
611
  #endif
616
612
 
617
613
  protected:
618
- bool decode_32bit(uint32_t field_id, Proto32Bit value) override;
619
- bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override;
620
- bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
621
614
  };
622
615
  class CoverStateResponse : public StateResponseProtoMessage {
623
616
  public:
624
- static constexpr uint16_t MESSAGE_TYPE = 22;
625
- static constexpr uint16_t ESTIMATED_SIZE = 23;
617
+ static constexpr uint8_t MESSAGE_TYPE = 22;
618
+ static constexpr uint8_t ESTIMATED_SIZE = 23;
626
619
  #ifdef HAS_PROTO_MESSAGE_DUMP
627
620
  const char *message_name() const override { return "cover_state_response"; }
628
621
  #endif
@@ -637,17 +630,14 @@ class CoverStateResponse : public StateResponseProtoMessage {
637
630
  #endif
638
631
 
639
632
  protected:
640
- bool decode_32bit(uint32_t field_id, Proto32Bit value) override;
641
- bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
642
633
  };
643
- class CoverCommandRequest : public ProtoMessage {
634
+ class CoverCommandRequest : public CommandProtoMessage {
644
635
  public:
645
- static constexpr uint16_t MESSAGE_TYPE = 30;
646
- static constexpr uint16_t ESTIMATED_SIZE = 25;
636
+ static constexpr uint8_t MESSAGE_TYPE = 30;
637
+ static constexpr uint8_t ESTIMATED_SIZE = 29;
647
638
  #ifdef HAS_PROTO_MESSAGE_DUMP
648
639
  const char *message_name() const override { return "cover_command_request"; }
649
640
  #endif
650
- uint32_t key{0};
651
641
  bool has_legacy_command{false};
652
642
  enums::LegacyCoverCommand legacy_command{};
653
643
  bool has_position{false};
@@ -655,8 +645,6 @@ class CoverCommandRequest : public ProtoMessage {
655
645
  bool has_tilt{false};
656
646
  float tilt{0.0f};
657
647
  bool stop{false};
658
- void encode(ProtoWriteBuffer buffer) const override;
659
- void calculate_size(uint32_t &total_size) const override;
660
648
  #ifdef HAS_PROTO_MESSAGE_DUMP
661
649
  void dump_to(std::string &out) const override;
662
650
  #endif
@@ -669,8 +657,8 @@ class CoverCommandRequest : public ProtoMessage {
669
657
  #ifdef USE_FAN
670
658
  class ListEntitiesFanResponse : public InfoResponseProtoMessage {
671
659
  public:
672
- static constexpr uint16_t MESSAGE_TYPE = 14;
673
- static constexpr uint16_t ESTIMATED_SIZE = 77;
660
+ static constexpr uint8_t MESSAGE_TYPE = 14;
661
+ static constexpr uint8_t ESTIMATED_SIZE = 77;
674
662
  #ifdef HAS_PROTO_MESSAGE_DUMP
675
663
  const char *message_name() const override { return "list_entities_fan_response"; }
676
664
  #endif
@@ -686,14 +674,11 @@ class ListEntitiesFanResponse : public InfoResponseProtoMessage {
686
674
  #endif
687
675
 
688
676
  protected:
689
- bool decode_32bit(uint32_t field_id, Proto32Bit value) override;
690
- bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override;
691
- bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
692
677
  };
693
678
  class FanStateResponse : public StateResponseProtoMessage {
694
679
  public:
695
- static constexpr uint16_t MESSAGE_TYPE = 23;
696
- static constexpr uint16_t ESTIMATED_SIZE = 30;
680
+ static constexpr uint8_t MESSAGE_TYPE = 23;
681
+ static constexpr uint8_t ESTIMATED_SIZE = 30;
697
682
  #ifdef HAS_PROTO_MESSAGE_DUMP
698
683
  const char *message_name() const override { return "fan_state_response"; }
699
684
  #endif
@@ -710,18 +695,14 @@ class FanStateResponse : public StateResponseProtoMessage {
710
695
  #endif
711
696
 
712
697
  protected:
713
- bool decode_32bit(uint32_t field_id, Proto32Bit value) override;
714
- bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override;
715
- bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
716
698
  };
717
- class FanCommandRequest : public ProtoMessage {
699
+ class FanCommandRequest : public CommandProtoMessage {
718
700
  public:
719
- static constexpr uint16_t MESSAGE_TYPE = 31;
720
- static constexpr uint16_t ESTIMATED_SIZE = 38;
701
+ static constexpr uint8_t MESSAGE_TYPE = 31;
702
+ static constexpr uint8_t ESTIMATED_SIZE = 42;
721
703
  #ifdef HAS_PROTO_MESSAGE_DUMP
722
704
  const char *message_name() const override { return "fan_command_request"; }
723
705
  #endif
724
- uint32_t key{0};
725
706
  bool has_state{false};
726
707
  bool state{false};
727
708
  bool has_speed{false};
@@ -734,8 +715,6 @@ class FanCommandRequest : public ProtoMessage {
734
715
  int32_t speed_level{0};
735
716
  bool has_preset_mode{false};
736
717
  std::string preset_mode{};
737
- void encode(ProtoWriteBuffer buffer) const override;
738
- void calculate_size(uint32_t &total_size) const override;
739
718
  #ifdef HAS_PROTO_MESSAGE_DUMP
740
719
  void dump_to(std::string &out) const override;
741
720
  #endif
@@ -749,8 +728,8 @@ class FanCommandRequest : public ProtoMessage {
749
728
  #ifdef USE_LIGHT
750
729
  class ListEntitiesLightResponse : public InfoResponseProtoMessage {
751
730
  public:
752
- static constexpr uint16_t MESSAGE_TYPE = 15;
753
- static constexpr uint16_t ESTIMATED_SIZE = 90;
731
+ static constexpr uint8_t MESSAGE_TYPE = 15;
732
+ static constexpr uint8_t ESTIMATED_SIZE = 90;
754
733
  #ifdef HAS_PROTO_MESSAGE_DUMP
755
734
  const char *message_name() const override { return "list_entities_light_response"; }
756
735
  #endif
@@ -769,14 +748,11 @@ class ListEntitiesLightResponse : public InfoResponseProtoMessage {
769
748
  #endif
770
749
 
771
750
  protected:
772
- bool decode_32bit(uint32_t field_id, Proto32Bit value) override;
773
- bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override;
774
- bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
775
751
  };
776
752
  class LightStateResponse : public StateResponseProtoMessage {
777
753
  public:
778
- static constexpr uint16_t MESSAGE_TYPE = 24;
779
- static constexpr uint16_t ESTIMATED_SIZE = 67;
754
+ static constexpr uint8_t MESSAGE_TYPE = 24;
755
+ static constexpr uint8_t ESTIMATED_SIZE = 67;
780
756
  #ifdef HAS_PROTO_MESSAGE_DUMP
781
757
  const char *message_name() const override { return "light_state_response"; }
782
758
  #endif
@@ -799,18 +775,14 @@ class LightStateResponse : public StateResponseProtoMessage {
799
775
  #endif
800
776
 
801
777
  protected:
802
- bool decode_32bit(uint32_t field_id, Proto32Bit value) override;
803
- bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override;
804
- bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
805
778
  };
806
- class LightCommandRequest : public ProtoMessage {
779
+ class LightCommandRequest : public CommandProtoMessage {
807
780
  public:
808
- static constexpr uint16_t MESSAGE_TYPE = 32;
809
- static constexpr uint16_t ESTIMATED_SIZE = 107;
781
+ static constexpr uint8_t MESSAGE_TYPE = 32;
782
+ static constexpr uint8_t ESTIMATED_SIZE = 112;
810
783
  #ifdef HAS_PROTO_MESSAGE_DUMP
811
784
  const char *message_name() const override { return "light_command_request"; }
812
785
  #endif
813
- uint32_t key{0};
814
786
  bool has_state{false};
815
787
  bool state{false};
816
788
  bool has_brightness{false};
@@ -837,8 +809,6 @@ class LightCommandRequest : public ProtoMessage {
837
809
  uint32_t flash_length{0};
838
810
  bool has_effect{false};
839
811
  std::string effect{};
840
- void encode(ProtoWriteBuffer buffer) const override;
841
- void calculate_size(uint32_t &total_size) const override;
842
812
  #ifdef HAS_PROTO_MESSAGE_DUMP
843
813
  void dump_to(std::string &out) const override;
844
814
  #endif
@@ -852,8 +822,8 @@ class LightCommandRequest : public ProtoMessage {
852
822
  #ifdef USE_SENSOR
853
823
  class ListEntitiesSensorResponse : public InfoResponseProtoMessage {
854
824
  public:
855
- static constexpr uint16_t MESSAGE_TYPE = 16;
856
- static constexpr uint16_t ESTIMATED_SIZE = 77;
825
+ static constexpr uint8_t MESSAGE_TYPE = 16;
826
+ static constexpr uint8_t ESTIMATED_SIZE = 77;
857
827
  #ifdef HAS_PROTO_MESSAGE_DUMP
858
828
  const char *message_name() const override { return "list_entities_sensor_response"; }
859
829
  #endif
@@ -870,14 +840,11 @@ class ListEntitiesSensorResponse : public InfoResponseProtoMessage {
870
840
  #endif
871
841
 
872
842
  protected:
873
- bool decode_32bit(uint32_t field_id, Proto32Bit value) override;
874
- bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override;
875
- bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
876
843
  };
877
844
  class SensorStateResponse : public StateResponseProtoMessage {
878
845
  public:
879
- static constexpr uint16_t MESSAGE_TYPE = 25;
880
- static constexpr uint16_t ESTIMATED_SIZE = 16;
846
+ static constexpr uint8_t MESSAGE_TYPE = 25;
847
+ static constexpr uint8_t ESTIMATED_SIZE = 16;
881
848
  #ifdef HAS_PROTO_MESSAGE_DUMP
882
849
  const char *message_name() const override { return "sensor_state_response"; }
883
850
  #endif
@@ -890,15 +857,13 @@ class SensorStateResponse : public StateResponseProtoMessage {
890
857
  #endif
891
858
 
892
859
  protected:
893
- bool decode_32bit(uint32_t field_id, Proto32Bit value) override;
894
- bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
895
860
  };
896
861
  #endif
897
862
  #ifdef USE_SWITCH
898
863
  class ListEntitiesSwitchResponse : public InfoResponseProtoMessage {
899
864
  public:
900
- static constexpr uint16_t MESSAGE_TYPE = 17;
901
- static constexpr uint16_t ESTIMATED_SIZE = 60;
865
+ static constexpr uint8_t MESSAGE_TYPE = 17;
866
+ static constexpr uint8_t ESTIMATED_SIZE = 60;
902
867
  #ifdef HAS_PROTO_MESSAGE_DUMP
903
868
  const char *message_name() const override { return "list_entities_switch_response"; }
904
869
  #endif
@@ -911,14 +876,11 @@ class ListEntitiesSwitchResponse : public InfoResponseProtoMessage {
911
876
  #endif
912
877
 
913
878
  protected:
914
- bool decode_32bit(uint32_t field_id, Proto32Bit value) override;
915
- bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override;
916
- bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
917
879
  };
918
880
  class SwitchStateResponse : public StateResponseProtoMessage {
919
881
  public:
920
- static constexpr uint16_t MESSAGE_TYPE = 26;
921
- static constexpr uint16_t ESTIMATED_SIZE = 11;
882
+ static constexpr uint8_t MESSAGE_TYPE = 26;
883
+ static constexpr uint8_t ESTIMATED_SIZE = 11;
922
884
  #ifdef HAS_PROTO_MESSAGE_DUMP
923
885
  const char *message_name() const override { return "switch_state_response"; }
924
886
  #endif
@@ -930,20 +892,15 @@ class SwitchStateResponse : public StateResponseProtoMessage {
930
892
  #endif
931
893
 
932
894
  protected:
933
- bool decode_32bit(uint32_t field_id, Proto32Bit value) override;
934
- bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
935
895
  };
936
- class SwitchCommandRequest : public ProtoMessage {
896
+ class SwitchCommandRequest : public CommandProtoMessage {
937
897
  public:
938
- static constexpr uint16_t MESSAGE_TYPE = 33;
939
- static constexpr uint16_t ESTIMATED_SIZE = 7;
898
+ static constexpr uint8_t MESSAGE_TYPE = 33;
899
+ static constexpr uint8_t ESTIMATED_SIZE = 11;
940
900
  #ifdef HAS_PROTO_MESSAGE_DUMP
941
901
  const char *message_name() const override { return "switch_command_request"; }
942
902
  #endif
943
- uint32_t key{0};
944
903
  bool state{false};
945
- void encode(ProtoWriteBuffer buffer) const override;
946
- void calculate_size(uint32_t &total_size) const override;
947
904
  #ifdef HAS_PROTO_MESSAGE_DUMP
948
905
  void dump_to(std::string &out) const override;
949
906
  #endif
@@ -956,8 +913,8 @@ class SwitchCommandRequest : public ProtoMessage {
956
913
  #ifdef USE_TEXT_SENSOR
957
914
  class ListEntitiesTextSensorResponse : public InfoResponseProtoMessage {
958
915
  public:
959
- static constexpr uint16_t MESSAGE_TYPE = 18;
960
- static constexpr uint16_t ESTIMATED_SIZE = 58;
916
+ static constexpr uint8_t MESSAGE_TYPE = 18;
917
+ static constexpr uint8_t ESTIMATED_SIZE = 58;
961
918
  #ifdef HAS_PROTO_MESSAGE_DUMP
962
919
  const char *message_name() const override { return "list_entities_text_sensor_response"; }
963
920
  #endif
@@ -969,14 +926,11 @@ class ListEntitiesTextSensorResponse : public InfoResponseProtoMessage {
969
926
  #endif
970
927
 
971
928
  protected:
972
- bool decode_32bit(uint32_t field_id, Proto32Bit value) override;
973
- bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override;
974
- bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
975
929
  };
976
930
  class TextSensorStateResponse : public StateResponseProtoMessage {
977
931
  public:
978
- static constexpr uint16_t MESSAGE_TYPE = 27;
979
- static constexpr uint16_t ESTIMATED_SIZE = 20;
932
+ static constexpr uint8_t MESSAGE_TYPE = 27;
933
+ static constexpr uint8_t ESTIMATED_SIZE = 20;
980
934
  #ifdef HAS_PROTO_MESSAGE_DUMP
981
935
  const char *message_name() const override { return "text_sensor_state_response"; }
982
936
  #endif
@@ -989,22 +943,17 @@ class TextSensorStateResponse : public StateResponseProtoMessage {
989
943
  #endif
990
944
 
991
945
  protected:
992
- bool decode_32bit(uint32_t field_id, Proto32Bit value) override;
993
- bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override;
994
- bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
995
946
  };
996
947
  #endif
997
948
  class SubscribeLogsRequest : public ProtoMessage {
998
949
  public:
999
- static constexpr uint16_t MESSAGE_TYPE = 28;
1000
- static constexpr uint16_t ESTIMATED_SIZE = 4;
950
+ static constexpr uint8_t MESSAGE_TYPE = 28;
951
+ static constexpr uint8_t ESTIMATED_SIZE = 4;
1001
952
  #ifdef HAS_PROTO_MESSAGE_DUMP
1002
953
  const char *message_name() const override { return "subscribe_logs_request"; }
1003
954
  #endif
1004
955
  enums::LogLevel level{};
1005
956
  bool dump_config{false};
1006
- void encode(ProtoWriteBuffer buffer) const override;
1007
- void calculate_size(uint32_t &total_size) const override;
1008
957
  #ifdef HAS_PROTO_MESSAGE_DUMP
1009
958
  void dump_to(std::string &out) const override;
1010
959
  #endif
@@ -1014,8 +963,8 @@ class SubscribeLogsRequest : public ProtoMessage {
1014
963
  };
1015
964
  class SubscribeLogsResponse : public ProtoMessage {
1016
965
  public:
1017
- static constexpr uint16_t MESSAGE_TYPE = 29;
1018
- static constexpr uint16_t ESTIMATED_SIZE = 13;
966
+ static constexpr uint8_t MESSAGE_TYPE = 29;
967
+ static constexpr uint8_t ESTIMATED_SIZE = 13;
1019
968
  #ifdef HAS_PROTO_MESSAGE_DUMP
1020
969
  const char *message_name() const override { return "subscribe_logs_response"; }
1021
970
  #endif
@@ -1029,20 +978,16 @@ class SubscribeLogsResponse : public ProtoMessage {
1029
978
  #endif
1030
979
 
1031
980
  protected:
1032
- bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override;
1033
- bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
1034
981
  };
1035
982
  #ifdef USE_API_NOISE
1036
983
  class NoiseEncryptionSetKeyRequest : public ProtoMessage {
1037
984
  public:
1038
- static constexpr uint16_t MESSAGE_TYPE = 124;
1039
- static constexpr uint16_t ESTIMATED_SIZE = 9;
985
+ static constexpr uint8_t MESSAGE_TYPE = 124;
986
+ static constexpr uint8_t ESTIMATED_SIZE = 9;
1040
987
  #ifdef HAS_PROTO_MESSAGE_DUMP
1041
988
  const char *message_name() const override { return "noise_encryption_set_key_request"; }
1042
989
  #endif
1043
990
  std::string key{};
1044
- void encode(ProtoWriteBuffer buffer) const override;
1045
- void calculate_size(uint32_t &total_size) const override;
1046
991
  #ifdef HAS_PROTO_MESSAGE_DUMP
1047
992
  void dump_to(std::string &out) const override;
1048
993
  #endif
@@ -1052,8 +997,8 @@ class NoiseEncryptionSetKeyRequest : public ProtoMessage {
1052
997
  };
1053
998
  class NoiseEncryptionSetKeyResponse : public ProtoMessage {
1054
999
  public:
1055
- static constexpr uint16_t MESSAGE_TYPE = 125;
1056
- static constexpr uint16_t ESTIMATED_SIZE = 2;
1000
+ static constexpr uint8_t MESSAGE_TYPE = 125;
1001
+ static constexpr uint8_t ESTIMATED_SIZE = 2;
1057
1002
  #ifdef HAS_PROTO_MESSAGE_DUMP
1058
1003
  const char *message_name() const override { return "noise_encryption_set_key_response"; }
1059
1004
  #endif
@@ -1065,13 +1010,12 @@ class NoiseEncryptionSetKeyResponse : public ProtoMessage {
1065
1010
  #endif
1066
1011
 
1067
1012
  protected:
1068
- bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
1069
1013
  };
1070
1014
  #endif
1071
1015
  class SubscribeHomeassistantServicesRequest : public ProtoMessage {
1072
1016
  public:
1073
- static constexpr uint16_t MESSAGE_TYPE = 34;
1074
- static constexpr uint16_t ESTIMATED_SIZE = 0;
1017
+ static constexpr uint8_t MESSAGE_TYPE = 34;
1018
+ static constexpr uint8_t ESTIMATED_SIZE = 0;
1075
1019
  #ifdef HAS_PROTO_MESSAGE_DUMP
1076
1020
  const char *message_name() const override { return "subscribe_homeassistant_services_request"; }
1077
1021
  #endif
@@ -1096,8 +1040,8 @@ class HomeassistantServiceMap : public ProtoMessage {
1096
1040
  };
1097
1041
  class HomeassistantServiceResponse : public ProtoMessage {
1098
1042
  public:
1099
- static constexpr uint16_t MESSAGE_TYPE = 35;
1100
- static constexpr uint16_t ESTIMATED_SIZE = 113;
1043
+ static constexpr uint8_t MESSAGE_TYPE = 35;
1044
+ static constexpr uint8_t ESTIMATED_SIZE = 113;
1101
1045
  #ifdef HAS_PROTO_MESSAGE_DUMP
1102
1046
  const char *message_name() const override { return "homeassistant_service_response"; }
1103
1047
  #endif
@@ -1113,13 +1057,11 @@ class HomeassistantServiceResponse : public ProtoMessage {
1113
1057
  #endif
1114
1058
 
1115
1059
  protected:
1116
- bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override;
1117
- bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
1118
1060
  };
1119
1061
  class SubscribeHomeAssistantStatesRequest : public ProtoMessage {
1120
1062
  public:
1121
- static constexpr uint16_t MESSAGE_TYPE = 38;
1122
- static constexpr uint16_t ESTIMATED_SIZE = 0;
1063
+ static constexpr uint8_t MESSAGE_TYPE = 38;
1064
+ static constexpr uint8_t ESTIMATED_SIZE = 0;
1123
1065
  #ifdef HAS_PROTO_MESSAGE_DUMP
1124
1066
  const char *message_name() const override { return "subscribe_home_assistant_states_request"; }
1125
1067
  #endif
@@ -1131,8 +1073,8 @@ class SubscribeHomeAssistantStatesRequest : public ProtoMessage {
1131
1073
  };
1132
1074
  class SubscribeHomeAssistantStateResponse : public ProtoMessage {
1133
1075
  public:
1134
- static constexpr uint16_t MESSAGE_TYPE = 39;
1135
- static constexpr uint16_t ESTIMATED_SIZE = 20;
1076
+ static constexpr uint8_t MESSAGE_TYPE = 39;
1077
+ static constexpr uint8_t ESTIMATED_SIZE = 20;
1136
1078
  #ifdef HAS_PROTO_MESSAGE_DUMP
1137
1079
  const char *message_name() const override { return "subscribe_home_assistant_state_response"; }
1138
1080
  #endif
@@ -1146,21 +1088,17 @@ class SubscribeHomeAssistantStateResponse : public ProtoMessage {
1146
1088
  #endif
1147
1089
 
1148
1090
  protected:
1149
- bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override;
1150
- bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
1151
1091
  };
1152
1092
  class HomeAssistantStateResponse : public ProtoMessage {
1153
1093
  public:
1154
- static constexpr uint16_t MESSAGE_TYPE = 40;
1155
- static constexpr uint16_t ESTIMATED_SIZE = 27;
1094
+ static constexpr uint8_t MESSAGE_TYPE = 40;
1095
+ static constexpr uint8_t ESTIMATED_SIZE = 27;
1156
1096
  #ifdef HAS_PROTO_MESSAGE_DUMP
1157
1097
  const char *message_name() const override { return "home_assistant_state_response"; }
1158
1098
  #endif
1159
1099
  std::string entity_id{};
1160
1100
  std::string state{};
1161
1101
  std::string attribute{};
1162
- void encode(ProtoWriteBuffer buffer) const override;
1163
- void calculate_size(uint32_t &total_size) const override;
1164
1102
  #ifdef HAS_PROTO_MESSAGE_DUMP
1165
1103
  void dump_to(std::string &out) const override;
1166
1104
  #endif
@@ -1170,8 +1108,8 @@ class HomeAssistantStateResponse : public ProtoMessage {
1170
1108
  };
1171
1109
  class GetTimeRequest : public ProtoMessage {
1172
1110
  public:
1173
- static constexpr uint16_t MESSAGE_TYPE = 36;
1174
- static constexpr uint16_t ESTIMATED_SIZE = 0;
1111
+ static constexpr uint8_t MESSAGE_TYPE = 36;
1112
+ static constexpr uint8_t ESTIMATED_SIZE = 0;
1175
1113
  #ifdef HAS_PROTO_MESSAGE_DUMP
1176
1114
  const char *message_name() const override { return "get_time_request"; }
1177
1115
  #endif
@@ -1183,8 +1121,8 @@ class GetTimeRequest : public ProtoMessage {
1183
1121
  };
1184
1122
  class GetTimeResponse : public ProtoMessage {
1185
1123
  public:
1186
- static constexpr uint16_t MESSAGE_TYPE = 37;
1187
- static constexpr uint16_t ESTIMATED_SIZE = 5;
1124
+ static constexpr uint8_t MESSAGE_TYPE = 37;
1125
+ static constexpr uint8_t ESTIMATED_SIZE = 5;
1188
1126
  #ifdef HAS_PROTO_MESSAGE_DUMP
1189
1127
  const char *message_name() const override { return "get_time_response"; }
1190
1128
  #endif
@@ -1198,6 +1136,7 @@ class GetTimeResponse : public ProtoMessage {
1198
1136
  protected:
1199
1137
  bool decode_32bit(uint32_t field_id, Proto32Bit value) override;
1200
1138
  };
1139
+ #ifdef USE_API_SERVICES
1201
1140
  class ListEntitiesServicesArgument : public ProtoMessage {
1202
1141
  public:
1203
1142
  std::string name{};
@@ -1214,8 +1153,8 @@ class ListEntitiesServicesArgument : public ProtoMessage {
1214
1153
  };
1215
1154
  class ListEntitiesServicesResponse : public ProtoMessage {
1216
1155
  public:
1217
- static constexpr uint16_t MESSAGE_TYPE = 41;
1218
- static constexpr uint16_t ESTIMATED_SIZE = 48;
1156
+ static constexpr uint8_t MESSAGE_TYPE = 41;
1157
+ static constexpr uint8_t ESTIMATED_SIZE = 48;
1219
1158
  #ifdef HAS_PROTO_MESSAGE_DUMP
1220
1159
  const char *message_name() const override { return "list_entities_services_response"; }
1221
1160
  #endif
@@ -1229,8 +1168,6 @@ class ListEntitiesServicesResponse : public ProtoMessage {
1229
1168
  #endif
1230
1169
 
1231
1170
  protected:
1232
- bool decode_32bit(uint32_t field_id, Proto32Bit value) override;
1233
- bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override;
1234
1171
  };
1235
1172
  class ExecuteServiceArgument : public ProtoMessage {
1236
1173
  public:
@@ -1256,15 +1193,13 @@ class ExecuteServiceArgument : public ProtoMessage {
1256
1193
  };
1257
1194
  class ExecuteServiceRequest : public ProtoMessage {
1258
1195
  public:
1259
- static constexpr uint16_t MESSAGE_TYPE = 42;
1260
- static constexpr uint16_t ESTIMATED_SIZE = 39;
1196
+ static constexpr uint8_t MESSAGE_TYPE = 42;
1197
+ static constexpr uint8_t ESTIMATED_SIZE = 39;
1261
1198
  #ifdef HAS_PROTO_MESSAGE_DUMP
1262
1199
  const char *message_name() const override { return "execute_service_request"; }
1263
1200
  #endif
1264
1201
  uint32_t key{0};
1265
1202
  std::vector<ExecuteServiceArgument> args{};
1266
- void encode(ProtoWriteBuffer buffer) const override;
1267
- void calculate_size(uint32_t &total_size) const override;
1268
1203
  #ifdef HAS_PROTO_MESSAGE_DUMP
1269
1204
  void dump_to(std::string &out) const override;
1270
1205
  #endif
@@ -1273,11 +1208,12 @@ class ExecuteServiceRequest : public ProtoMessage {
1273
1208
  bool decode_32bit(uint32_t field_id, Proto32Bit value) override;
1274
1209
  bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override;
1275
1210
  };
1211
+ #endif
1276
1212
  #ifdef USE_CAMERA
1277
1213
  class ListEntitiesCameraResponse : public InfoResponseProtoMessage {
1278
1214
  public:
1279
- static constexpr uint16_t MESSAGE_TYPE = 43;
1280
- static constexpr uint16_t ESTIMATED_SIZE = 49;
1215
+ static constexpr uint8_t MESSAGE_TYPE = 43;
1216
+ static constexpr uint8_t ESTIMATED_SIZE = 49;
1281
1217
  #ifdef HAS_PROTO_MESSAGE_DUMP
1282
1218
  const char *message_name() const override { return "list_entities_camera_response"; }
1283
1219
  #endif
@@ -1288,18 +1224,14 @@ class ListEntitiesCameraResponse : public InfoResponseProtoMessage {
1288
1224
  #endif
1289
1225
 
1290
1226
  protected:
1291
- bool decode_32bit(uint32_t field_id, Proto32Bit value) override;
1292
- bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override;
1293
- bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
1294
1227
  };
1295
- class CameraImageResponse : public ProtoMessage {
1228
+ class CameraImageResponse : public StateResponseProtoMessage {
1296
1229
  public:
1297
- static constexpr uint16_t MESSAGE_TYPE = 44;
1298
- static constexpr uint16_t ESTIMATED_SIZE = 16;
1230
+ static constexpr uint8_t MESSAGE_TYPE = 44;
1231
+ static constexpr uint8_t ESTIMATED_SIZE = 20;
1299
1232
  #ifdef HAS_PROTO_MESSAGE_DUMP
1300
1233
  const char *message_name() const override { return "camera_image_response"; }
1301
1234
  #endif
1302
- uint32_t key{0};
1303
1235
  std::string data{};
1304
1236
  bool done{false};
1305
1237
  void encode(ProtoWriteBuffer buffer) const override;
@@ -1309,21 +1241,16 @@ class CameraImageResponse : public ProtoMessage {
1309
1241
  #endif
1310
1242
 
1311
1243
  protected:
1312
- bool decode_32bit(uint32_t field_id, Proto32Bit value) override;
1313
- bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override;
1314
- bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
1315
1244
  };
1316
1245
  class CameraImageRequest : public ProtoMessage {
1317
1246
  public:
1318
- static constexpr uint16_t MESSAGE_TYPE = 45;
1319
- static constexpr uint16_t ESTIMATED_SIZE = 4;
1247
+ static constexpr uint8_t MESSAGE_TYPE = 45;
1248
+ static constexpr uint8_t ESTIMATED_SIZE = 4;
1320
1249
  #ifdef HAS_PROTO_MESSAGE_DUMP
1321
1250
  const char *message_name() const override { return "camera_image_request"; }
1322
1251
  #endif
1323
1252
  bool single{false};
1324
1253
  bool stream{false};
1325
- void encode(ProtoWriteBuffer buffer) const override;
1326
- void calculate_size(uint32_t &total_size) const override;
1327
1254
  #ifdef HAS_PROTO_MESSAGE_DUMP
1328
1255
  void dump_to(std::string &out) const override;
1329
1256
  #endif
@@ -1335,8 +1262,8 @@ class CameraImageRequest : public ProtoMessage {
1335
1262
  #ifdef USE_CLIMATE
1336
1263
  class ListEntitiesClimateResponse : public InfoResponseProtoMessage {
1337
1264
  public:
1338
- static constexpr uint16_t MESSAGE_TYPE = 46;
1339
- static constexpr uint16_t ESTIMATED_SIZE = 156;
1265
+ static constexpr uint8_t MESSAGE_TYPE = 46;
1266
+ static constexpr uint8_t ESTIMATED_SIZE = 156;
1340
1267
  #ifdef HAS_PROTO_MESSAGE_DUMP
1341
1268
  const char *message_name() const override { return "list_entities_climate_response"; }
1342
1269
  #endif
@@ -1365,14 +1292,11 @@ class ListEntitiesClimateResponse : public InfoResponseProtoMessage {
1365
1292
  #endif
1366
1293
 
1367
1294
  protected:
1368
- bool decode_32bit(uint32_t field_id, Proto32Bit value) override;
1369
- bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override;
1370
- bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
1371
1295
  };
1372
1296
  class ClimateStateResponse : public StateResponseProtoMessage {
1373
1297
  public:
1374
- static constexpr uint16_t MESSAGE_TYPE = 47;
1375
- static constexpr uint16_t ESTIMATED_SIZE = 70;
1298
+ static constexpr uint8_t MESSAGE_TYPE = 47;
1299
+ static constexpr uint8_t ESTIMATED_SIZE = 70;
1376
1300
  #ifdef HAS_PROTO_MESSAGE_DUMP
1377
1301
  const char *message_name() const override { return "climate_state_response"; }
1378
1302
  #endif
@@ -1397,18 +1321,14 @@ class ClimateStateResponse : public StateResponseProtoMessage {
1397
1321
  #endif
1398
1322
 
1399
1323
  protected:
1400
- bool decode_32bit(uint32_t field_id, Proto32Bit value) override;
1401
- bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override;
1402
- bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
1403
1324
  };
1404
- class ClimateCommandRequest : public ProtoMessage {
1325
+ class ClimateCommandRequest : public CommandProtoMessage {
1405
1326
  public:
1406
- static constexpr uint16_t MESSAGE_TYPE = 48;
1407
- static constexpr uint16_t ESTIMATED_SIZE = 83;
1327
+ static constexpr uint8_t MESSAGE_TYPE = 48;
1328
+ static constexpr uint8_t ESTIMATED_SIZE = 88;
1408
1329
  #ifdef HAS_PROTO_MESSAGE_DUMP
1409
1330
  const char *message_name() const override { return "climate_command_request"; }
1410
1331
  #endif
1411
- uint32_t key{0};
1412
1332
  bool has_mode{false};
1413
1333
  enums::ClimateMode mode{};
1414
1334
  bool has_target_temperature{false};
@@ -1431,8 +1351,6 @@ class ClimateCommandRequest : public ProtoMessage {
1431
1351
  std::string custom_preset{};
1432
1352
  bool has_target_humidity{false};
1433
1353
  float target_humidity{0.0f};
1434
- void encode(ProtoWriteBuffer buffer) const override;
1435
- void calculate_size(uint32_t &total_size) const override;
1436
1354
  #ifdef HAS_PROTO_MESSAGE_DUMP
1437
1355
  void dump_to(std::string &out) const override;
1438
1356
  #endif
@@ -1446,8 +1364,8 @@ class ClimateCommandRequest : public ProtoMessage {
1446
1364
  #ifdef USE_NUMBER
1447
1365
  class ListEntitiesNumberResponse : public InfoResponseProtoMessage {
1448
1366
  public:
1449
- static constexpr uint16_t MESSAGE_TYPE = 49;
1450
- static constexpr uint16_t ESTIMATED_SIZE = 84;
1367
+ static constexpr uint8_t MESSAGE_TYPE = 49;
1368
+ static constexpr uint8_t ESTIMATED_SIZE = 84;
1451
1369
  #ifdef HAS_PROTO_MESSAGE_DUMP
1452
1370
  const char *message_name() const override { return "list_entities_number_response"; }
1453
1371
  #endif
@@ -1464,14 +1382,11 @@ class ListEntitiesNumberResponse : public InfoResponseProtoMessage {
1464
1382
  #endif
1465
1383
 
1466
1384
  protected:
1467
- bool decode_32bit(uint32_t field_id, Proto32Bit value) override;
1468
- bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override;
1469
- bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
1470
1385
  };
1471
1386
  class NumberStateResponse : public StateResponseProtoMessage {
1472
1387
  public:
1473
- static constexpr uint16_t MESSAGE_TYPE = 50;
1474
- static constexpr uint16_t ESTIMATED_SIZE = 16;
1388
+ static constexpr uint8_t MESSAGE_TYPE = 50;
1389
+ static constexpr uint8_t ESTIMATED_SIZE = 16;
1475
1390
  #ifdef HAS_PROTO_MESSAGE_DUMP
1476
1391
  const char *message_name() const override { return "number_state_response"; }
1477
1392
  #endif
@@ -1484,33 +1399,29 @@ class NumberStateResponse : public StateResponseProtoMessage {
1484
1399
  #endif
1485
1400
 
1486
1401
  protected:
1487
- bool decode_32bit(uint32_t field_id, Proto32Bit value) override;
1488
- bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
1489
1402
  };
1490
- class NumberCommandRequest : public ProtoMessage {
1403
+ class NumberCommandRequest : public CommandProtoMessage {
1491
1404
  public:
1492
- static constexpr uint16_t MESSAGE_TYPE = 51;
1493
- static constexpr uint16_t ESTIMATED_SIZE = 10;
1405
+ static constexpr uint8_t MESSAGE_TYPE = 51;
1406
+ static constexpr uint8_t ESTIMATED_SIZE = 14;
1494
1407
  #ifdef HAS_PROTO_MESSAGE_DUMP
1495
1408
  const char *message_name() const override { return "number_command_request"; }
1496
1409
  #endif
1497
- uint32_t key{0};
1498
1410
  float state{0.0f};
1499
- void encode(ProtoWriteBuffer buffer) const override;
1500
- void calculate_size(uint32_t &total_size) const override;
1501
1411
  #ifdef HAS_PROTO_MESSAGE_DUMP
1502
1412
  void dump_to(std::string &out) const override;
1503
1413
  #endif
1504
1414
 
1505
1415
  protected:
1506
1416
  bool decode_32bit(uint32_t field_id, Proto32Bit value) override;
1417
+ bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
1507
1418
  };
1508
1419
  #endif
1509
1420
  #ifdef USE_SELECT
1510
1421
  class ListEntitiesSelectResponse : public InfoResponseProtoMessage {
1511
1422
  public:
1512
- static constexpr uint16_t MESSAGE_TYPE = 52;
1513
- static constexpr uint16_t ESTIMATED_SIZE = 67;
1423
+ static constexpr uint8_t MESSAGE_TYPE = 52;
1424
+ static constexpr uint8_t ESTIMATED_SIZE = 67;
1514
1425
  #ifdef HAS_PROTO_MESSAGE_DUMP
1515
1426
  const char *message_name() const override { return "list_entities_select_response"; }
1516
1427
  #endif
@@ -1522,14 +1433,11 @@ class ListEntitiesSelectResponse : public InfoResponseProtoMessage {
1522
1433
  #endif
1523
1434
 
1524
1435
  protected:
1525
- bool decode_32bit(uint32_t field_id, Proto32Bit value) override;
1526
- bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override;
1527
- bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
1528
1436
  };
1529
1437
  class SelectStateResponse : public StateResponseProtoMessage {
1530
1438
  public:
1531
- static constexpr uint16_t MESSAGE_TYPE = 53;
1532
- static constexpr uint16_t ESTIMATED_SIZE = 20;
1439
+ static constexpr uint8_t MESSAGE_TYPE = 53;
1440
+ static constexpr uint8_t ESTIMATED_SIZE = 20;
1533
1441
  #ifdef HAS_PROTO_MESSAGE_DUMP
1534
1442
  const char *message_name() const override { return "select_state_response"; }
1535
1443
  #endif
@@ -1542,21 +1450,15 @@ class SelectStateResponse : public StateResponseProtoMessage {
1542
1450
  #endif
1543
1451
 
1544
1452
  protected:
1545
- bool decode_32bit(uint32_t field_id, Proto32Bit value) override;
1546
- bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override;
1547
- bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
1548
1453
  };
1549
- class SelectCommandRequest : public ProtoMessage {
1454
+ class SelectCommandRequest : public CommandProtoMessage {
1550
1455
  public:
1551
- static constexpr uint16_t MESSAGE_TYPE = 54;
1552
- static constexpr uint16_t ESTIMATED_SIZE = 14;
1456
+ static constexpr uint8_t MESSAGE_TYPE = 54;
1457
+ static constexpr uint8_t ESTIMATED_SIZE = 18;
1553
1458
  #ifdef HAS_PROTO_MESSAGE_DUMP
1554
1459
  const char *message_name() const override { return "select_command_request"; }
1555
1460
  #endif
1556
- uint32_t key{0};
1557
1461
  std::string state{};
1558
- void encode(ProtoWriteBuffer buffer) const override;
1559
- void calculate_size(uint32_t &total_size) const override;
1560
1462
  #ifdef HAS_PROTO_MESSAGE_DUMP
1561
1463
  void dump_to(std::string &out) const override;
1562
1464
  #endif
@@ -1564,13 +1466,14 @@ class SelectCommandRequest : public ProtoMessage {
1564
1466
  protected:
1565
1467
  bool decode_32bit(uint32_t field_id, Proto32Bit value) override;
1566
1468
  bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override;
1469
+ bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
1567
1470
  };
1568
1471
  #endif
1569
1472
  #ifdef USE_SIREN
1570
1473
  class ListEntitiesSirenResponse : public InfoResponseProtoMessage {
1571
1474
  public:
1572
- static constexpr uint16_t MESSAGE_TYPE = 55;
1573
- static constexpr uint16_t ESTIMATED_SIZE = 71;
1475
+ static constexpr uint8_t MESSAGE_TYPE = 55;
1476
+ static constexpr uint8_t ESTIMATED_SIZE = 71;
1574
1477
  #ifdef HAS_PROTO_MESSAGE_DUMP
1575
1478
  const char *message_name() const override { return "list_entities_siren_response"; }
1576
1479
  #endif
@@ -1584,14 +1487,11 @@ class ListEntitiesSirenResponse : public InfoResponseProtoMessage {
1584
1487
  #endif
1585
1488
 
1586
1489
  protected:
1587
- bool decode_32bit(uint32_t field_id, Proto32Bit value) override;
1588
- bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override;
1589
- bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
1590
1490
  };
1591
1491
  class SirenStateResponse : public StateResponseProtoMessage {
1592
1492
  public:
1593
- static constexpr uint16_t MESSAGE_TYPE = 56;
1594
- static constexpr uint16_t ESTIMATED_SIZE = 11;
1493
+ static constexpr uint8_t MESSAGE_TYPE = 56;
1494
+ static constexpr uint8_t ESTIMATED_SIZE = 11;
1595
1495
  #ifdef HAS_PROTO_MESSAGE_DUMP
1596
1496
  const char *message_name() const override { return "siren_state_response"; }
1597
1497
  #endif
@@ -1603,17 +1503,14 @@ class SirenStateResponse : public StateResponseProtoMessage {
1603
1503
  #endif
1604
1504
 
1605
1505
  protected:
1606
- bool decode_32bit(uint32_t field_id, Proto32Bit value) override;
1607
- bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
1608
1506
  };
1609
- class SirenCommandRequest : public ProtoMessage {
1507
+ class SirenCommandRequest : public CommandProtoMessage {
1610
1508
  public:
1611
- static constexpr uint16_t MESSAGE_TYPE = 57;
1612
- static constexpr uint16_t ESTIMATED_SIZE = 33;
1509
+ static constexpr uint8_t MESSAGE_TYPE = 57;
1510
+ static constexpr uint8_t ESTIMATED_SIZE = 37;
1613
1511
  #ifdef HAS_PROTO_MESSAGE_DUMP
1614
1512
  const char *message_name() const override { return "siren_command_request"; }
1615
1513
  #endif
1616
- uint32_t key{0};
1617
1514
  bool has_state{false};
1618
1515
  bool state{false};
1619
1516
  bool has_tone{false};
@@ -1622,8 +1519,6 @@ class SirenCommandRequest : public ProtoMessage {
1622
1519
  uint32_t duration{0};
1623
1520
  bool has_volume{false};
1624
1521
  float volume{0.0f};
1625
- void encode(ProtoWriteBuffer buffer) const override;
1626
- void calculate_size(uint32_t &total_size) const override;
1627
1522
  #ifdef HAS_PROTO_MESSAGE_DUMP
1628
1523
  void dump_to(std::string &out) const override;
1629
1524
  #endif
@@ -1637,8 +1532,8 @@ class SirenCommandRequest : public ProtoMessage {
1637
1532
  #ifdef USE_LOCK
1638
1533
  class ListEntitiesLockResponse : public InfoResponseProtoMessage {
1639
1534
  public:
1640
- static constexpr uint16_t MESSAGE_TYPE = 58;
1641
- static constexpr uint16_t ESTIMATED_SIZE = 64;
1535
+ static constexpr uint8_t MESSAGE_TYPE = 58;
1536
+ static constexpr uint8_t ESTIMATED_SIZE = 64;
1642
1537
  #ifdef HAS_PROTO_MESSAGE_DUMP
1643
1538
  const char *message_name() const override { return "list_entities_lock_response"; }
1644
1539
  #endif
@@ -1653,14 +1548,11 @@ class ListEntitiesLockResponse : public InfoResponseProtoMessage {
1653
1548
  #endif
1654
1549
 
1655
1550
  protected:
1656
- bool decode_32bit(uint32_t field_id, Proto32Bit value) override;
1657
- bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override;
1658
- bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
1659
1551
  };
1660
1552
  class LockStateResponse : public StateResponseProtoMessage {
1661
1553
  public:
1662
- static constexpr uint16_t MESSAGE_TYPE = 59;
1663
- static constexpr uint16_t ESTIMATED_SIZE = 11;
1554
+ static constexpr uint8_t MESSAGE_TYPE = 59;
1555
+ static constexpr uint8_t ESTIMATED_SIZE = 11;
1664
1556
  #ifdef HAS_PROTO_MESSAGE_DUMP
1665
1557
  const char *message_name() const override { return "lock_state_response"; }
1666
1558
  #endif
@@ -1672,22 +1564,17 @@ class LockStateResponse : public StateResponseProtoMessage {
1672
1564
  #endif
1673
1565
 
1674
1566
  protected:
1675
- bool decode_32bit(uint32_t field_id, Proto32Bit value) override;
1676
- bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
1677
1567
  };
1678
- class LockCommandRequest : public ProtoMessage {
1568
+ class LockCommandRequest : public CommandProtoMessage {
1679
1569
  public:
1680
- static constexpr uint16_t MESSAGE_TYPE = 60;
1681
- static constexpr uint16_t ESTIMATED_SIZE = 18;
1570
+ static constexpr uint8_t MESSAGE_TYPE = 60;
1571
+ static constexpr uint8_t ESTIMATED_SIZE = 22;
1682
1572
  #ifdef HAS_PROTO_MESSAGE_DUMP
1683
1573
  const char *message_name() const override { return "lock_command_request"; }
1684
1574
  #endif
1685
- uint32_t key{0};
1686
1575
  enums::LockCommand command{};
1687
1576
  bool has_code{false};
1688
1577
  std::string code{};
1689
- void encode(ProtoWriteBuffer buffer) const override;
1690
- void calculate_size(uint32_t &total_size) const override;
1691
1578
  #ifdef HAS_PROTO_MESSAGE_DUMP
1692
1579
  void dump_to(std::string &out) const override;
1693
1580
  #endif
@@ -1701,8 +1588,8 @@ class LockCommandRequest : public ProtoMessage {
1701
1588
  #ifdef USE_BUTTON
1702
1589
  class ListEntitiesButtonResponse : public InfoResponseProtoMessage {
1703
1590
  public:
1704
- static constexpr uint16_t MESSAGE_TYPE = 61;
1705
- static constexpr uint16_t ESTIMATED_SIZE = 58;
1591
+ static constexpr uint8_t MESSAGE_TYPE = 61;
1592
+ static constexpr uint8_t ESTIMATED_SIZE = 58;
1706
1593
  #ifdef HAS_PROTO_MESSAGE_DUMP
1707
1594
  const char *message_name() const override { return "list_entities_button_response"; }
1708
1595
  #endif
@@ -1714,26 +1601,21 @@ class ListEntitiesButtonResponse : public InfoResponseProtoMessage {
1714
1601
  #endif
1715
1602
 
1716
1603
  protected:
1717
- bool decode_32bit(uint32_t field_id, Proto32Bit value) override;
1718
- bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override;
1719
- bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
1720
1604
  };
1721
- class ButtonCommandRequest : public ProtoMessage {
1605
+ class ButtonCommandRequest : public CommandProtoMessage {
1722
1606
  public:
1723
- static constexpr uint16_t MESSAGE_TYPE = 62;
1724
- static constexpr uint16_t ESTIMATED_SIZE = 5;
1607
+ static constexpr uint8_t MESSAGE_TYPE = 62;
1608
+ static constexpr uint8_t ESTIMATED_SIZE = 9;
1725
1609
  #ifdef HAS_PROTO_MESSAGE_DUMP
1726
1610
  const char *message_name() const override { return "button_command_request"; }
1727
1611
  #endif
1728
- uint32_t key{0};
1729
- void encode(ProtoWriteBuffer buffer) const override;
1730
- void calculate_size(uint32_t &total_size) const override;
1731
1612
  #ifdef HAS_PROTO_MESSAGE_DUMP
1732
1613
  void dump_to(std::string &out) const override;
1733
1614
  #endif
1734
1615
 
1735
1616
  protected:
1736
1617
  bool decode_32bit(uint32_t field_id, Proto32Bit value) override;
1618
+ bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
1737
1619
  };
1738
1620
  #endif
1739
1621
  #ifdef USE_MEDIA_PLAYER
@@ -1756,8 +1638,8 @@ class MediaPlayerSupportedFormat : public ProtoMessage {
1756
1638
  };
1757
1639
  class ListEntitiesMediaPlayerResponse : public InfoResponseProtoMessage {
1758
1640
  public:
1759
- static constexpr uint16_t MESSAGE_TYPE = 63;
1760
- static constexpr uint16_t ESTIMATED_SIZE = 85;
1641
+ static constexpr uint8_t MESSAGE_TYPE = 63;
1642
+ static constexpr uint8_t ESTIMATED_SIZE = 85;
1761
1643
  #ifdef HAS_PROTO_MESSAGE_DUMP
1762
1644
  const char *message_name() const override { return "list_entities_media_player_response"; }
1763
1645
  #endif
@@ -1770,14 +1652,11 @@ class ListEntitiesMediaPlayerResponse : public InfoResponseProtoMessage {
1770
1652
  #endif
1771
1653
 
1772
1654
  protected:
1773
- bool decode_32bit(uint32_t field_id, Proto32Bit value) override;
1774
- bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override;
1775
- bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
1776
1655
  };
1777
1656
  class MediaPlayerStateResponse : public StateResponseProtoMessage {
1778
1657
  public:
1779
- static constexpr uint16_t MESSAGE_TYPE = 64;
1780
- static constexpr uint16_t ESTIMATED_SIZE = 18;
1658
+ static constexpr uint8_t MESSAGE_TYPE = 64;
1659
+ static constexpr uint8_t ESTIMATED_SIZE = 18;
1781
1660
  #ifdef HAS_PROTO_MESSAGE_DUMP
1782
1661
  const char *message_name() const override { return "media_player_state_response"; }
1783
1662
  #endif
@@ -1791,17 +1670,14 @@ class MediaPlayerStateResponse : public StateResponseProtoMessage {
1791
1670
  #endif
1792
1671
 
1793
1672
  protected:
1794
- bool decode_32bit(uint32_t field_id, Proto32Bit value) override;
1795
- bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
1796
1673
  };
1797
- class MediaPlayerCommandRequest : public ProtoMessage {
1674
+ class MediaPlayerCommandRequest : public CommandProtoMessage {
1798
1675
  public:
1799
- static constexpr uint16_t MESSAGE_TYPE = 65;
1800
- static constexpr uint16_t ESTIMATED_SIZE = 31;
1676
+ static constexpr uint8_t MESSAGE_TYPE = 65;
1677
+ static constexpr uint8_t ESTIMATED_SIZE = 35;
1801
1678
  #ifdef HAS_PROTO_MESSAGE_DUMP
1802
1679
  const char *message_name() const override { return "media_player_command_request"; }
1803
1680
  #endif
1804
- uint32_t key{0};
1805
1681
  bool has_command{false};
1806
1682
  enums::MediaPlayerCommand command{};
1807
1683
  bool has_volume{false};
@@ -1810,8 +1686,6 @@ class MediaPlayerCommandRequest : public ProtoMessage {
1810
1686
  std::string media_url{};
1811
1687
  bool has_announcement{false};
1812
1688
  bool announcement{false};
1813
- void encode(ProtoWriteBuffer buffer) const override;
1814
- void calculate_size(uint32_t &total_size) const override;
1815
1689
  #ifdef HAS_PROTO_MESSAGE_DUMP
1816
1690
  void dump_to(std::string &out) const override;
1817
1691
  #endif
@@ -1825,14 +1699,12 @@ class MediaPlayerCommandRequest : public ProtoMessage {
1825
1699
  #ifdef USE_BLUETOOTH_PROXY
1826
1700
  class SubscribeBluetoothLEAdvertisementsRequest : public ProtoMessage {
1827
1701
  public:
1828
- static constexpr uint16_t MESSAGE_TYPE = 66;
1829
- static constexpr uint16_t ESTIMATED_SIZE = 4;
1702
+ static constexpr uint8_t MESSAGE_TYPE = 66;
1703
+ static constexpr uint8_t ESTIMATED_SIZE = 4;
1830
1704
  #ifdef HAS_PROTO_MESSAGE_DUMP
1831
1705
  const char *message_name() const override { return "subscribe_bluetooth_le_advertisements_request"; }
1832
1706
  #endif
1833
1707
  uint32_t flags{0};
1834
- void encode(ProtoWriteBuffer buffer) const override;
1835
- void calculate_size(uint32_t &total_size) const override;
1836
1708
  #ifdef HAS_PROTO_MESSAGE_DUMP
1837
1709
  void dump_to(std::string &out) const override;
1838
1710
  #endif
@@ -1857,8 +1729,8 @@ class BluetoothServiceData : public ProtoMessage {
1857
1729
  };
1858
1730
  class BluetoothLEAdvertisementResponse : public ProtoMessage {
1859
1731
  public:
1860
- static constexpr uint16_t MESSAGE_TYPE = 67;
1861
- static constexpr uint16_t ESTIMATED_SIZE = 107;
1732
+ static constexpr uint8_t MESSAGE_TYPE = 67;
1733
+ static constexpr uint8_t ESTIMATED_SIZE = 107;
1862
1734
  #ifdef HAS_PROTO_MESSAGE_DUMP
1863
1735
  const char *message_name() const override { return "bluetooth_le_advertisement_response"; }
1864
1736
  #endif
@@ -1876,8 +1748,6 @@ class BluetoothLEAdvertisementResponse : public ProtoMessage {
1876
1748
  #endif
1877
1749
 
1878
1750
  protected:
1879
- bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override;
1880
- bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
1881
1751
  };
1882
1752
  class BluetoothLERawAdvertisement : public ProtoMessage {
1883
1753
  public:
@@ -1897,8 +1767,8 @@ class BluetoothLERawAdvertisement : public ProtoMessage {
1897
1767
  };
1898
1768
  class BluetoothLERawAdvertisementsResponse : public ProtoMessage {
1899
1769
  public:
1900
- static constexpr uint16_t MESSAGE_TYPE = 93;
1901
- static constexpr uint16_t ESTIMATED_SIZE = 34;
1770
+ static constexpr uint8_t MESSAGE_TYPE = 93;
1771
+ static constexpr uint8_t ESTIMATED_SIZE = 34;
1902
1772
  #ifdef HAS_PROTO_MESSAGE_DUMP
1903
1773
  const char *message_name() const override { return "bluetooth_le_raw_advertisements_response"; }
1904
1774
  #endif
@@ -1910,12 +1780,11 @@ class BluetoothLERawAdvertisementsResponse : public ProtoMessage {
1910
1780
  #endif
1911
1781
 
1912
1782
  protected:
1913
- bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override;
1914
1783
  };
1915
1784
  class BluetoothDeviceRequest : public ProtoMessage {
1916
1785
  public:
1917
- static constexpr uint16_t MESSAGE_TYPE = 68;
1918
- static constexpr uint16_t ESTIMATED_SIZE = 12;
1786
+ static constexpr uint8_t MESSAGE_TYPE = 68;
1787
+ static constexpr uint8_t ESTIMATED_SIZE = 12;
1919
1788
  #ifdef HAS_PROTO_MESSAGE_DUMP
1920
1789
  const char *message_name() const override { return "bluetooth_device_request"; }
1921
1790
  #endif
@@ -1923,8 +1792,6 @@ class BluetoothDeviceRequest : public ProtoMessage {
1923
1792
  enums::BluetoothDeviceRequestType request_type{};
1924
1793
  bool has_address_type{false};
1925
1794
  uint32_t address_type{0};
1926
- void encode(ProtoWriteBuffer buffer) const override;
1927
- void calculate_size(uint32_t &total_size) const override;
1928
1795
  #ifdef HAS_PROTO_MESSAGE_DUMP
1929
1796
  void dump_to(std::string &out) const override;
1930
1797
  #endif
@@ -1934,8 +1801,8 @@ class BluetoothDeviceRequest : public ProtoMessage {
1934
1801
  };
1935
1802
  class BluetoothDeviceConnectionResponse : public ProtoMessage {
1936
1803
  public:
1937
- static constexpr uint16_t MESSAGE_TYPE = 69;
1938
- static constexpr uint16_t ESTIMATED_SIZE = 14;
1804
+ static constexpr uint8_t MESSAGE_TYPE = 69;
1805
+ static constexpr uint8_t ESTIMATED_SIZE = 14;
1939
1806
  #ifdef HAS_PROTO_MESSAGE_DUMP
1940
1807
  const char *message_name() const override { return "bluetooth_device_connection_response"; }
1941
1808
  #endif
@@ -1950,18 +1817,15 @@ class BluetoothDeviceConnectionResponse : public ProtoMessage {
1950
1817
  #endif
1951
1818
 
1952
1819
  protected:
1953
- bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
1954
1820
  };
1955
1821
  class BluetoothGATTGetServicesRequest : public ProtoMessage {
1956
1822
  public:
1957
- static constexpr uint16_t MESSAGE_TYPE = 70;
1958
- static constexpr uint16_t ESTIMATED_SIZE = 4;
1823
+ static constexpr uint8_t MESSAGE_TYPE = 70;
1824
+ static constexpr uint8_t ESTIMATED_SIZE = 4;
1959
1825
  #ifdef HAS_PROTO_MESSAGE_DUMP
1960
1826
  const char *message_name() const override { return "bluetooth_gatt_get_services_request"; }
1961
1827
  #endif
1962
1828
  uint64_t address{0};
1963
- void encode(ProtoWriteBuffer buffer) const override;
1964
- void calculate_size(uint32_t &total_size) const override;
1965
1829
  #ifdef HAS_PROTO_MESSAGE_DUMP
1966
1830
  void dump_to(std::string &out) const override;
1967
1831
  #endif
@@ -2015,8 +1879,8 @@ class BluetoothGATTService : public ProtoMessage {
2015
1879
  };
2016
1880
  class BluetoothGATTGetServicesResponse : public ProtoMessage {
2017
1881
  public:
2018
- static constexpr uint16_t MESSAGE_TYPE = 71;
2019
- static constexpr uint16_t ESTIMATED_SIZE = 38;
1882
+ static constexpr uint8_t MESSAGE_TYPE = 71;
1883
+ static constexpr uint8_t ESTIMATED_SIZE = 38;
2020
1884
  #ifdef HAS_PROTO_MESSAGE_DUMP
2021
1885
  const char *message_name() const override { return "bluetooth_gatt_get_services_response"; }
2022
1886
  #endif
@@ -2029,13 +1893,11 @@ class BluetoothGATTGetServicesResponse : public ProtoMessage {
2029
1893
  #endif
2030
1894
 
2031
1895
  protected:
2032
- bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override;
2033
- bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
2034
1896
  };
2035
1897
  class BluetoothGATTGetServicesDoneResponse : public ProtoMessage {
2036
1898
  public:
2037
- static constexpr uint16_t MESSAGE_TYPE = 72;
2038
- static constexpr uint16_t ESTIMATED_SIZE = 4;
1899
+ static constexpr uint8_t MESSAGE_TYPE = 72;
1900
+ static constexpr uint8_t ESTIMATED_SIZE = 4;
2039
1901
  #ifdef HAS_PROTO_MESSAGE_DUMP
2040
1902
  const char *message_name() const override { return "bluetooth_gatt_get_services_done_response"; }
2041
1903
  #endif
@@ -2047,19 +1909,16 @@ class BluetoothGATTGetServicesDoneResponse : public ProtoMessage {
2047
1909
  #endif
2048
1910
 
2049
1911
  protected:
2050
- bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
2051
1912
  };
2052
1913
  class BluetoothGATTReadRequest : public ProtoMessage {
2053
1914
  public:
2054
- static constexpr uint16_t MESSAGE_TYPE = 73;
2055
- static constexpr uint16_t ESTIMATED_SIZE = 8;
1915
+ static constexpr uint8_t MESSAGE_TYPE = 73;
1916
+ static constexpr uint8_t ESTIMATED_SIZE = 8;
2056
1917
  #ifdef HAS_PROTO_MESSAGE_DUMP
2057
1918
  const char *message_name() const override { return "bluetooth_gatt_read_request"; }
2058
1919
  #endif
2059
1920
  uint64_t address{0};
2060
1921
  uint32_t handle{0};
2061
- void encode(ProtoWriteBuffer buffer) const override;
2062
- void calculate_size(uint32_t &total_size) const override;
2063
1922
  #ifdef HAS_PROTO_MESSAGE_DUMP
2064
1923
  void dump_to(std::string &out) const override;
2065
1924
  #endif
@@ -2069,8 +1928,8 @@ class BluetoothGATTReadRequest : public ProtoMessage {
2069
1928
  };
2070
1929
  class BluetoothGATTReadResponse : public ProtoMessage {
2071
1930
  public:
2072
- static constexpr uint16_t MESSAGE_TYPE = 74;
2073
- static constexpr uint16_t ESTIMATED_SIZE = 17;
1931
+ static constexpr uint8_t MESSAGE_TYPE = 74;
1932
+ static constexpr uint8_t ESTIMATED_SIZE = 17;
2074
1933
  #ifdef HAS_PROTO_MESSAGE_DUMP
2075
1934
  const char *message_name() const override { return "bluetooth_gatt_read_response"; }
2076
1935
  #endif
@@ -2084,13 +1943,11 @@ class BluetoothGATTReadResponse : public ProtoMessage {
2084
1943
  #endif
2085
1944
 
2086
1945
  protected:
2087
- bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override;
2088
- bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
2089
1946
  };
2090
1947
  class BluetoothGATTWriteRequest : public ProtoMessage {
2091
1948
  public:
2092
- static constexpr uint16_t MESSAGE_TYPE = 75;
2093
- static constexpr uint16_t ESTIMATED_SIZE = 19;
1949
+ static constexpr uint8_t MESSAGE_TYPE = 75;
1950
+ static constexpr uint8_t ESTIMATED_SIZE = 19;
2094
1951
  #ifdef HAS_PROTO_MESSAGE_DUMP
2095
1952
  const char *message_name() const override { return "bluetooth_gatt_write_request"; }
2096
1953
  #endif
@@ -2098,8 +1955,6 @@ class BluetoothGATTWriteRequest : public ProtoMessage {
2098
1955
  uint32_t handle{0};
2099
1956
  bool response{false};
2100
1957
  std::string data{};
2101
- void encode(ProtoWriteBuffer buffer) const override;
2102
- void calculate_size(uint32_t &total_size) const override;
2103
1958
  #ifdef HAS_PROTO_MESSAGE_DUMP
2104
1959
  void dump_to(std::string &out) const override;
2105
1960
  #endif
@@ -2110,15 +1965,13 @@ class BluetoothGATTWriteRequest : public ProtoMessage {
2110
1965
  };
2111
1966
  class BluetoothGATTReadDescriptorRequest : public ProtoMessage {
2112
1967
  public:
2113
- static constexpr uint16_t MESSAGE_TYPE = 76;
2114
- static constexpr uint16_t ESTIMATED_SIZE = 8;
1968
+ static constexpr uint8_t MESSAGE_TYPE = 76;
1969
+ static constexpr uint8_t ESTIMATED_SIZE = 8;
2115
1970
  #ifdef HAS_PROTO_MESSAGE_DUMP
2116
1971
  const char *message_name() const override { return "bluetooth_gatt_read_descriptor_request"; }
2117
1972
  #endif
2118
1973
  uint64_t address{0};
2119
1974
  uint32_t handle{0};
2120
- void encode(ProtoWriteBuffer buffer) const override;
2121
- void calculate_size(uint32_t &total_size) const override;
2122
1975
  #ifdef HAS_PROTO_MESSAGE_DUMP
2123
1976
  void dump_to(std::string &out) const override;
2124
1977
  #endif
@@ -2128,16 +1981,14 @@ class BluetoothGATTReadDescriptorRequest : public ProtoMessage {
2128
1981
  };
2129
1982
  class BluetoothGATTWriteDescriptorRequest : public ProtoMessage {
2130
1983
  public:
2131
- static constexpr uint16_t MESSAGE_TYPE = 77;
2132
- static constexpr uint16_t ESTIMATED_SIZE = 17;
1984
+ static constexpr uint8_t MESSAGE_TYPE = 77;
1985
+ static constexpr uint8_t ESTIMATED_SIZE = 17;
2133
1986
  #ifdef HAS_PROTO_MESSAGE_DUMP
2134
1987
  const char *message_name() const override { return "bluetooth_gatt_write_descriptor_request"; }
2135
1988
  #endif
2136
1989
  uint64_t address{0};
2137
1990
  uint32_t handle{0};
2138
1991
  std::string data{};
2139
- void encode(ProtoWriteBuffer buffer) const override;
2140
- void calculate_size(uint32_t &total_size) const override;
2141
1992
  #ifdef HAS_PROTO_MESSAGE_DUMP
2142
1993
  void dump_to(std::string &out) const override;
2143
1994
  #endif
@@ -2148,16 +1999,14 @@ class BluetoothGATTWriteDescriptorRequest : public ProtoMessage {
2148
1999
  };
2149
2000
  class BluetoothGATTNotifyRequest : public ProtoMessage {
2150
2001
  public:
2151
- static constexpr uint16_t MESSAGE_TYPE = 78;
2152
- static constexpr uint16_t ESTIMATED_SIZE = 10;
2002
+ static constexpr uint8_t MESSAGE_TYPE = 78;
2003
+ static constexpr uint8_t ESTIMATED_SIZE = 10;
2153
2004
  #ifdef HAS_PROTO_MESSAGE_DUMP
2154
2005
  const char *message_name() const override { return "bluetooth_gatt_notify_request"; }
2155
2006
  #endif
2156
2007
  uint64_t address{0};
2157
2008
  uint32_t handle{0};
2158
2009
  bool enable{false};
2159
- void encode(ProtoWriteBuffer buffer) const override;
2160
- void calculate_size(uint32_t &total_size) const override;
2161
2010
  #ifdef HAS_PROTO_MESSAGE_DUMP
2162
2011
  void dump_to(std::string &out) const override;
2163
2012
  #endif
@@ -2167,8 +2016,8 @@ class BluetoothGATTNotifyRequest : public ProtoMessage {
2167
2016
  };
2168
2017
  class BluetoothGATTNotifyDataResponse : public ProtoMessage {
2169
2018
  public:
2170
- static constexpr uint16_t MESSAGE_TYPE = 79;
2171
- static constexpr uint16_t ESTIMATED_SIZE = 17;
2019
+ static constexpr uint8_t MESSAGE_TYPE = 79;
2020
+ static constexpr uint8_t ESTIMATED_SIZE = 17;
2172
2021
  #ifdef HAS_PROTO_MESSAGE_DUMP
2173
2022
  const char *message_name() const override { return "bluetooth_gatt_notify_data_response"; }
2174
2023
  #endif
@@ -2182,13 +2031,11 @@ class BluetoothGATTNotifyDataResponse : public ProtoMessage {
2182
2031
  #endif
2183
2032
 
2184
2033
  protected:
2185
- bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override;
2186
- bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
2187
2034
  };
2188
2035
  class SubscribeBluetoothConnectionsFreeRequest : public ProtoMessage {
2189
2036
  public:
2190
- static constexpr uint16_t MESSAGE_TYPE = 80;
2191
- static constexpr uint16_t ESTIMATED_SIZE = 0;
2037
+ static constexpr uint8_t MESSAGE_TYPE = 80;
2038
+ static constexpr uint8_t ESTIMATED_SIZE = 0;
2192
2039
  #ifdef HAS_PROTO_MESSAGE_DUMP
2193
2040
  const char *message_name() const override { return "subscribe_bluetooth_connections_free_request"; }
2194
2041
  #endif
@@ -2200,8 +2047,8 @@ class SubscribeBluetoothConnectionsFreeRequest : public ProtoMessage {
2200
2047
  };
2201
2048
  class BluetoothConnectionsFreeResponse : public ProtoMessage {
2202
2049
  public:
2203
- static constexpr uint16_t MESSAGE_TYPE = 81;
2204
- static constexpr uint16_t ESTIMATED_SIZE = 16;
2050
+ static constexpr uint8_t MESSAGE_TYPE = 81;
2051
+ static constexpr uint8_t ESTIMATED_SIZE = 16;
2205
2052
  #ifdef HAS_PROTO_MESSAGE_DUMP
2206
2053
  const char *message_name() const override { return "bluetooth_connections_free_response"; }
2207
2054
  #endif
@@ -2215,12 +2062,11 @@ class BluetoothConnectionsFreeResponse : public ProtoMessage {
2215
2062
  #endif
2216
2063
 
2217
2064
  protected:
2218
- bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
2219
2065
  };
2220
2066
  class BluetoothGATTErrorResponse : public ProtoMessage {
2221
2067
  public:
2222
- static constexpr uint16_t MESSAGE_TYPE = 82;
2223
- static constexpr uint16_t ESTIMATED_SIZE = 12;
2068
+ static constexpr uint8_t MESSAGE_TYPE = 82;
2069
+ static constexpr uint8_t ESTIMATED_SIZE = 12;
2224
2070
  #ifdef HAS_PROTO_MESSAGE_DUMP
2225
2071
  const char *message_name() const override { return "bluetooth_gatt_error_response"; }
2226
2072
  #endif
@@ -2234,12 +2080,11 @@ class BluetoothGATTErrorResponse : public ProtoMessage {
2234
2080
  #endif
2235
2081
 
2236
2082
  protected:
2237
- bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
2238
2083
  };
2239
2084
  class BluetoothGATTWriteResponse : public ProtoMessage {
2240
2085
  public:
2241
- static constexpr uint16_t MESSAGE_TYPE = 83;
2242
- static constexpr uint16_t ESTIMATED_SIZE = 8;
2086
+ static constexpr uint8_t MESSAGE_TYPE = 83;
2087
+ static constexpr uint8_t ESTIMATED_SIZE = 8;
2243
2088
  #ifdef HAS_PROTO_MESSAGE_DUMP
2244
2089
  const char *message_name() const override { return "bluetooth_gatt_write_response"; }
2245
2090
  #endif
@@ -2252,12 +2097,11 @@ class BluetoothGATTWriteResponse : public ProtoMessage {
2252
2097
  #endif
2253
2098
 
2254
2099
  protected:
2255
- bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
2256
2100
  };
2257
2101
  class BluetoothGATTNotifyResponse : public ProtoMessage {
2258
2102
  public:
2259
- static constexpr uint16_t MESSAGE_TYPE = 84;
2260
- static constexpr uint16_t ESTIMATED_SIZE = 8;
2103
+ static constexpr uint8_t MESSAGE_TYPE = 84;
2104
+ static constexpr uint8_t ESTIMATED_SIZE = 8;
2261
2105
  #ifdef HAS_PROTO_MESSAGE_DUMP
2262
2106
  const char *message_name() const override { return "bluetooth_gatt_notify_response"; }
2263
2107
  #endif
@@ -2270,12 +2114,11 @@ class BluetoothGATTNotifyResponse : public ProtoMessage {
2270
2114
  #endif
2271
2115
 
2272
2116
  protected:
2273
- bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
2274
2117
  };
2275
2118
  class BluetoothDevicePairingResponse : public ProtoMessage {
2276
2119
  public:
2277
- static constexpr uint16_t MESSAGE_TYPE = 85;
2278
- static constexpr uint16_t ESTIMATED_SIZE = 10;
2120
+ static constexpr uint8_t MESSAGE_TYPE = 85;
2121
+ static constexpr uint8_t ESTIMATED_SIZE = 10;
2279
2122
  #ifdef HAS_PROTO_MESSAGE_DUMP
2280
2123
  const char *message_name() const override { return "bluetooth_device_pairing_response"; }
2281
2124
  #endif
@@ -2289,12 +2132,11 @@ class BluetoothDevicePairingResponse : public ProtoMessage {
2289
2132
  #endif
2290
2133
 
2291
2134
  protected:
2292
- bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
2293
2135
  };
2294
2136
  class BluetoothDeviceUnpairingResponse : public ProtoMessage {
2295
2137
  public:
2296
- static constexpr uint16_t MESSAGE_TYPE = 86;
2297
- static constexpr uint16_t ESTIMATED_SIZE = 10;
2138
+ static constexpr uint8_t MESSAGE_TYPE = 86;
2139
+ static constexpr uint8_t ESTIMATED_SIZE = 10;
2298
2140
  #ifdef HAS_PROTO_MESSAGE_DUMP
2299
2141
  const char *message_name() const override { return "bluetooth_device_unpairing_response"; }
2300
2142
  #endif
@@ -2308,12 +2150,11 @@ class BluetoothDeviceUnpairingResponse : public ProtoMessage {
2308
2150
  #endif
2309
2151
 
2310
2152
  protected:
2311
- bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
2312
2153
  };
2313
2154
  class UnsubscribeBluetoothLEAdvertisementsRequest : public ProtoMessage {
2314
2155
  public:
2315
- static constexpr uint16_t MESSAGE_TYPE = 87;
2316
- static constexpr uint16_t ESTIMATED_SIZE = 0;
2156
+ static constexpr uint8_t MESSAGE_TYPE = 87;
2157
+ static constexpr uint8_t ESTIMATED_SIZE = 0;
2317
2158
  #ifdef HAS_PROTO_MESSAGE_DUMP
2318
2159
  const char *message_name() const override { return "unsubscribe_bluetooth_le_advertisements_request"; }
2319
2160
  #endif
@@ -2325,8 +2166,8 @@ class UnsubscribeBluetoothLEAdvertisementsRequest : public ProtoMessage {
2325
2166
  };
2326
2167
  class BluetoothDeviceClearCacheResponse : public ProtoMessage {
2327
2168
  public:
2328
- static constexpr uint16_t MESSAGE_TYPE = 88;
2329
- static constexpr uint16_t ESTIMATED_SIZE = 10;
2169
+ static constexpr uint8_t MESSAGE_TYPE = 88;
2170
+ static constexpr uint8_t ESTIMATED_SIZE = 10;
2330
2171
  #ifdef HAS_PROTO_MESSAGE_DUMP
2331
2172
  const char *message_name() const override { return "bluetooth_device_clear_cache_response"; }
2332
2173
  #endif
@@ -2340,12 +2181,11 @@ class BluetoothDeviceClearCacheResponse : public ProtoMessage {
2340
2181
  #endif
2341
2182
 
2342
2183
  protected:
2343
- bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
2344
2184
  };
2345
2185
  class BluetoothScannerStateResponse : public ProtoMessage {
2346
2186
  public:
2347
- static constexpr uint16_t MESSAGE_TYPE = 126;
2348
- static constexpr uint16_t ESTIMATED_SIZE = 4;
2187
+ static constexpr uint8_t MESSAGE_TYPE = 126;
2188
+ static constexpr uint8_t ESTIMATED_SIZE = 4;
2349
2189
  #ifdef HAS_PROTO_MESSAGE_DUMP
2350
2190
  const char *message_name() const override { return "bluetooth_scanner_state_response"; }
2351
2191
  #endif
@@ -2358,18 +2198,15 @@ class BluetoothScannerStateResponse : public ProtoMessage {
2358
2198
  #endif
2359
2199
 
2360
2200
  protected:
2361
- bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
2362
2201
  };
2363
2202
  class BluetoothScannerSetModeRequest : public ProtoMessage {
2364
2203
  public:
2365
- static constexpr uint16_t MESSAGE_TYPE = 127;
2366
- static constexpr uint16_t ESTIMATED_SIZE = 2;
2204
+ static constexpr uint8_t MESSAGE_TYPE = 127;
2205
+ static constexpr uint8_t ESTIMATED_SIZE = 2;
2367
2206
  #ifdef HAS_PROTO_MESSAGE_DUMP
2368
2207
  const char *message_name() const override { return "bluetooth_scanner_set_mode_request"; }
2369
2208
  #endif
2370
2209
  enums::BluetoothScannerMode mode{};
2371
- void encode(ProtoWriteBuffer buffer) const override;
2372
- void calculate_size(uint32_t &total_size) const override;
2373
2210
  #ifdef HAS_PROTO_MESSAGE_DUMP
2374
2211
  void dump_to(std::string &out) const override;
2375
2212
  #endif
@@ -2381,15 +2218,13 @@ class BluetoothScannerSetModeRequest : public ProtoMessage {
2381
2218
  #ifdef USE_VOICE_ASSISTANT
2382
2219
  class SubscribeVoiceAssistantRequest : public ProtoMessage {
2383
2220
  public:
2384
- static constexpr uint16_t MESSAGE_TYPE = 89;
2385
- static constexpr uint16_t ESTIMATED_SIZE = 6;
2221
+ static constexpr uint8_t MESSAGE_TYPE = 89;
2222
+ static constexpr uint8_t ESTIMATED_SIZE = 6;
2386
2223
  #ifdef HAS_PROTO_MESSAGE_DUMP
2387
2224
  const char *message_name() const override { return "subscribe_voice_assistant_request"; }
2388
2225
  #endif
2389
2226
  bool subscribe{false};
2390
2227
  uint32_t flags{0};
2391
- void encode(ProtoWriteBuffer buffer) const override;
2392
- void calculate_size(uint32_t &total_size) const override;
2393
2228
  #ifdef HAS_PROTO_MESSAGE_DUMP
2394
2229
  void dump_to(std::string &out) const override;
2395
2230
  #endif
@@ -2414,8 +2249,8 @@ class VoiceAssistantAudioSettings : public ProtoMessage {
2414
2249
  };
2415
2250
  class VoiceAssistantRequest : public ProtoMessage {
2416
2251
  public:
2417
- static constexpr uint16_t MESSAGE_TYPE = 90;
2418
- static constexpr uint16_t ESTIMATED_SIZE = 41;
2252
+ static constexpr uint8_t MESSAGE_TYPE = 90;
2253
+ static constexpr uint8_t ESTIMATED_SIZE = 41;
2419
2254
  #ifdef HAS_PROTO_MESSAGE_DUMP
2420
2255
  const char *message_name() const override { return "voice_assistant_request"; }
2421
2256
  #endif
@@ -2431,20 +2266,16 @@ class VoiceAssistantRequest : public ProtoMessage {
2431
2266
  #endif
2432
2267
 
2433
2268
  protected:
2434
- bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override;
2435
- bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
2436
2269
  };
2437
2270
  class VoiceAssistantResponse : public ProtoMessage {
2438
2271
  public:
2439
- static constexpr uint16_t MESSAGE_TYPE = 91;
2440
- static constexpr uint16_t ESTIMATED_SIZE = 6;
2272
+ static constexpr uint8_t MESSAGE_TYPE = 91;
2273
+ static constexpr uint8_t ESTIMATED_SIZE = 6;
2441
2274
  #ifdef HAS_PROTO_MESSAGE_DUMP
2442
2275
  const char *message_name() const override { return "voice_assistant_response"; }
2443
2276
  #endif
2444
2277
  uint32_t port{0};
2445
2278
  bool error{false};
2446
- void encode(ProtoWriteBuffer buffer) const override;
2447
- void calculate_size(uint32_t &total_size) const override;
2448
2279
  #ifdef HAS_PROTO_MESSAGE_DUMP
2449
2280
  void dump_to(std::string &out) const override;
2450
2281
  #endif
@@ -2467,15 +2298,13 @@ class VoiceAssistantEventData : public ProtoMessage {
2467
2298
  };
2468
2299
  class VoiceAssistantEventResponse : public ProtoMessage {
2469
2300
  public:
2470
- static constexpr uint16_t MESSAGE_TYPE = 92;
2471
- static constexpr uint16_t ESTIMATED_SIZE = 36;
2301
+ static constexpr uint8_t MESSAGE_TYPE = 92;
2302
+ static constexpr uint8_t ESTIMATED_SIZE = 36;
2472
2303
  #ifdef HAS_PROTO_MESSAGE_DUMP
2473
2304
  const char *message_name() const override { return "voice_assistant_event_response"; }
2474
2305
  #endif
2475
2306
  enums::VoiceAssistantEvent event_type{};
2476
2307
  std::vector<VoiceAssistantEventData> data{};
2477
- void encode(ProtoWriteBuffer buffer) const override;
2478
- void calculate_size(uint32_t &total_size) const override;
2479
2308
  #ifdef HAS_PROTO_MESSAGE_DUMP
2480
2309
  void dump_to(std::string &out) const override;
2481
2310
  #endif
@@ -2486,8 +2315,8 @@ class VoiceAssistantEventResponse : public ProtoMessage {
2486
2315
  };
2487
2316
  class VoiceAssistantAudio : public ProtoMessage {
2488
2317
  public:
2489
- static constexpr uint16_t MESSAGE_TYPE = 106;
2490
- static constexpr uint16_t ESTIMATED_SIZE = 11;
2318
+ static constexpr uint8_t MESSAGE_TYPE = 106;
2319
+ static constexpr uint8_t ESTIMATED_SIZE = 11;
2491
2320
  #ifdef HAS_PROTO_MESSAGE_DUMP
2492
2321
  const char *message_name() const override { return "voice_assistant_audio"; }
2493
2322
  #endif
@@ -2505,8 +2334,8 @@ class VoiceAssistantAudio : public ProtoMessage {
2505
2334
  };
2506
2335
  class VoiceAssistantTimerEventResponse : public ProtoMessage {
2507
2336
  public:
2508
- static constexpr uint16_t MESSAGE_TYPE = 115;
2509
- static constexpr uint16_t ESTIMATED_SIZE = 30;
2337
+ static constexpr uint8_t MESSAGE_TYPE = 115;
2338
+ static constexpr uint8_t ESTIMATED_SIZE = 30;
2510
2339
  #ifdef HAS_PROTO_MESSAGE_DUMP
2511
2340
  const char *message_name() const override { return "voice_assistant_timer_event_response"; }
2512
2341
  #endif
@@ -2516,8 +2345,6 @@ class VoiceAssistantTimerEventResponse : public ProtoMessage {
2516
2345
  uint32_t total_seconds{0};
2517
2346
  uint32_t seconds_left{0};
2518
2347
  bool is_active{false};
2519
- void encode(ProtoWriteBuffer buffer) const override;
2520
- void calculate_size(uint32_t &total_size) const override;
2521
2348
  #ifdef HAS_PROTO_MESSAGE_DUMP
2522
2349
  void dump_to(std::string &out) const override;
2523
2350
  #endif
@@ -2528,8 +2355,8 @@ class VoiceAssistantTimerEventResponse : public ProtoMessage {
2528
2355
  };
2529
2356
  class VoiceAssistantAnnounceRequest : public ProtoMessage {
2530
2357
  public:
2531
- static constexpr uint16_t MESSAGE_TYPE = 119;
2532
- static constexpr uint16_t ESTIMATED_SIZE = 29;
2358
+ static constexpr uint8_t MESSAGE_TYPE = 119;
2359
+ static constexpr uint8_t ESTIMATED_SIZE = 29;
2533
2360
  #ifdef HAS_PROTO_MESSAGE_DUMP
2534
2361
  const char *message_name() const override { return "voice_assistant_announce_request"; }
2535
2362
  #endif
@@ -2537,8 +2364,6 @@ class VoiceAssistantAnnounceRequest : public ProtoMessage {
2537
2364
  std::string text{};
2538
2365
  std::string preannounce_media_id{};
2539
2366
  bool start_conversation{false};
2540
- void encode(ProtoWriteBuffer buffer) const override;
2541
- void calculate_size(uint32_t &total_size) const override;
2542
2367
  #ifdef HAS_PROTO_MESSAGE_DUMP
2543
2368
  void dump_to(std::string &out) const override;
2544
2369
  #endif
@@ -2549,8 +2374,8 @@ class VoiceAssistantAnnounceRequest : public ProtoMessage {
2549
2374
  };
2550
2375
  class VoiceAssistantAnnounceFinished : public ProtoMessage {
2551
2376
  public:
2552
- static constexpr uint16_t MESSAGE_TYPE = 120;
2553
- static constexpr uint16_t ESTIMATED_SIZE = 2;
2377
+ static constexpr uint8_t MESSAGE_TYPE = 120;
2378
+ static constexpr uint8_t ESTIMATED_SIZE = 2;
2554
2379
  #ifdef HAS_PROTO_MESSAGE_DUMP
2555
2380
  const char *message_name() const override { return "voice_assistant_announce_finished"; }
2556
2381
  #endif
@@ -2562,7 +2387,6 @@ class VoiceAssistantAnnounceFinished : public ProtoMessage {
2562
2387
  #endif
2563
2388
 
2564
2389
  protected:
2565
- bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
2566
2390
  };
2567
2391
  class VoiceAssistantWakeWord : public ProtoMessage {
2568
2392
  public:
@@ -2580,8 +2404,8 @@ class VoiceAssistantWakeWord : public ProtoMessage {
2580
2404
  };
2581
2405
  class VoiceAssistantConfigurationRequest : public ProtoMessage {
2582
2406
  public:
2583
- static constexpr uint16_t MESSAGE_TYPE = 121;
2584
- static constexpr uint16_t ESTIMATED_SIZE = 0;
2407
+ static constexpr uint8_t MESSAGE_TYPE = 121;
2408
+ static constexpr uint8_t ESTIMATED_SIZE = 0;
2585
2409
  #ifdef HAS_PROTO_MESSAGE_DUMP
2586
2410
  const char *message_name() const override { return "voice_assistant_configuration_request"; }
2587
2411
  #endif
@@ -2593,8 +2417,8 @@ class VoiceAssistantConfigurationRequest : public ProtoMessage {
2593
2417
  };
2594
2418
  class VoiceAssistantConfigurationResponse : public ProtoMessage {
2595
2419
  public:
2596
- static constexpr uint16_t MESSAGE_TYPE = 122;
2597
- static constexpr uint16_t ESTIMATED_SIZE = 56;
2420
+ static constexpr uint8_t MESSAGE_TYPE = 122;
2421
+ static constexpr uint8_t ESTIMATED_SIZE = 56;
2598
2422
  #ifdef HAS_PROTO_MESSAGE_DUMP
2599
2423
  const char *message_name() const override { return "voice_assistant_configuration_response"; }
2600
2424
  #endif
@@ -2608,19 +2432,15 @@ class VoiceAssistantConfigurationResponse : public ProtoMessage {
2608
2432
  #endif
2609
2433
 
2610
2434
  protected:
2611
- bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override;
2612
- bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
2613
2435
  };
2614
2436
  class VoiceAssistantSetConfiguration : public ProtoMessage {
2615
2437
  public:
2616
- static constexpr uint16_t MESSAGE_TYPE = 123;
2617
- static constexpr uint16_t ESTIMATED_SIZE = 18;
2438
+ static constexpr uint8_t MESSAGE_TYPE = 123;
2439
+ static constexpr uint8_t ESTIMATED_SIZE = 18;
2618
2440
  #ifdef HAS_PROTO_MESSAGE_DUMP
2619
2441
  const char *message_name() const override { return "voice_assistant_set_configuration"; }
2620
2442
  #endif
2621
2443
  std::vector<std::string> active_wake_words{};
2622
- void encode(ProtoWriteBuffer buffer) const override;
2623
- void calculate_size(uint32_t &total_size) const override;
2624
2444
  #ifdef HAS_PROTO_MESSAGE_DUMP
2625
2445
  void dump_to(std::string &out) const override;
2626
2446
  #endif
@@ -2632,8 +2452,8 @@ class VoiceAssistantSetConfiguration : public ProtoMessage {
2632
2452
  #ifdef USE_ALARM_CONTROL_PANEL
2633
2453
  class ListEntitiesAlarmControlPanelResponse : public InfoResponseProtoMessage {
2634
2454
  public:
2635
- static constexpr uint16_t MESSAGE_TYPE = 94;
2636
- static constexpr uint16_t ESTIMATED_SIZE = 57;
2455
+ static constexpr uint8_t MESSAGE_TYPE = 94;
2456
+ static constexpr uint8_t ESTIMATED_SIZE = 57;
2637
2457
  #ifdef HAS_PROTO_MESSAGE_DUMP
2638
2458
  const char *message_name() const override { return "list_entities_alarm_control_panel_response"; }
2639
2459
  #endif
@@ -2647,14 +2467,11 @@ class ListEntitiesAlarmControlPanelResponse : public InfoResponseProtoMessage {
2647
2467
  #endif
2648
2468
 
2649
2469
  protected:
2650
- bool decode_32bit(uint32_t field_id, Proto32Bit value) override;
2651
- bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override;
2652
- bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
2653
2470
  };
2654
2471
  class AlarmControlPanelStateResponse : public StateResponseProtoMessage {
2655
2472
  public:
2656
- static constexpr uint16_t MESSAGE_TYPE = 95;
2657
- static constexpr uint16_t ESTIMATED_SIZE = 11;
2473
+ static constexpr uint8_t MESSAGE_TYPE = 95;
2474
+ static constexpr uint8_t ESTIMATED_SIZE = 11;
2658
2475
  #ifdef HAS_PROTO_MESSAGE_DUMP
2659
2476
  const char *message_name() const override { return "alarm_control_panel_state_response"; }
2660
2477
  #endif
@@ -2666,21 +2483,16 @@ class AlarmControlPanelStateResponse : public StateResponseProtoMessage {
2666
2483
  #endif
2667
2484
 
2668
2485
  protected:
2669
- bool decode_32bit(uint32_t field_id, Proto32Bit value) override;
2670
- bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
2671
2486
  };
2672
- class AlarmControlPanelCommandRequest : public ProtoMessage {
2487
+ class AlarmControlPanelCommandRequest : public CommandProtoMessage {
2673
2488
  public:
2674
- static constexpr uint16_t MESSAGE_TYPE = 96;
2675
- static constexpr uint16_t ESTIMATED_SIZE = 16;
2489
+ static constexpr uint8_t MESSAGE_TYPE = 96;
2490
+ static constexpr uint8_t ESTIMATED_SIZE = 20;
2676
2491
  #ifdef HAS_PROTO_MESSAGE_DUMP
2677
2492
  const char *message_name() const override { return "alarm_control_panel_command_request"; }
2678
2493
  #endif
2679
- uint32_t key{0};
2680
2494
  enums::AlarmControlPanelStateCommand command{};
2681
2495
  std::string code{};
2682
- void encode(ProtoWriteBuffer buffer) const override;
2683
- void calculate_size(uint32_t &total_size) const override;
2684
2496
  #ifdef HAS_PROTO_MESSAGE_DUMP
2685
2497
  void dump_to(std::string &out) const override;
2686
2498
  #endif
@@ -2694,8 +2506,8 @@ class AlarmControlPanelCommandRequest : public ProtoMessage {
2694
2506
  #ifdef USE_TEXT
2695
2507
  class ListEntitiesTextResponse : public InfoResponseProtoMessage {
2696
2508
  public:
2697
- static constexpr uint16_t MESSAGE_TYPE = 97;
2698
- static constexpr uint16_t ESTIMATED_SIZE = 68;
2509
+ static constexpr uint8_t MESSAGE_TYPE = 97;
2510
+ static constexpr uint8_t ESTIMATED_SIZE = 68;
2699
2511
  #ifdef HAS_PROTO_MESSAGE_DUMP
2700
2512
  const char *message_name() const override { return "list_entities_text_response"; }
2701
2513
  #endif
@@ -2710,14 +2522,11 @@ class ListEntitiesTextResponse : public InfoResponseProtoMessage {
2710
2522
  #endif
2711
2523
 
2712
2524
  protected:
2713
- bool decode_32bit(uint32_t field_id, Proto32Bit value) override;
2714
- bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override;
2715
- bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
2716
2525
  };
2717
2526
  class TextStateResponse : public StateResponseProtoMessage {
2718
2527
  public:
2719
- static constexpr uint16_t MESSAGE_TYPE = 98;
2720
- static constexpr uint16_t ESTIMATED_SIZE = 20;
2528
+ static constexpr uint8_t MESSAGE_TYPE = 98;
2529
+ static constexpr uint8_t ESTIMATED_SIZE = 20;
2721
2530
  #ifdef HAS_PROTO_MESSAGE_DUMP
2722
2531
  const char *message_name() const override { return "text_state_response"; }
2723
2532
  #endif
@@ -2730,21 +2539,15 @@ class TextStateResponse : public StateResponseProtoMessage {
2730
2539
  #endif
2731
2540
 
2732
2541
  protected:
2733
- bool decode_32bit(uint32_t field_id, Proto32Bit value) override;
2734
- bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override;
2735
- bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
2736
2542
  };
2737
- class TextCommandRequest : public ProtoMessage {
2543
+ class TextCommandRequest : public CommandProtoMessage {
2738
2544
  public:
2739
- static constexpr uint16_t MESSAGE_TYPE = 99;
2740
- static constexpr uint16_t ESTIMATED_SIZE = 14;
2545
+ static constexpr uint8_t MESSAGE_TYPE = 99;
2546
+ static constexpr uint8_t ESTIMATED_SIZE = 18;
2741
2547
  #ifdef HAS_PROTO_MESSAGE_DUMP
2742
2548
  const char *message_name() const override { return "text_command_request"; }
2743
2549
  #endif
2744
- uint32_t key{0};
2745
2550
  std::string state{};
2746
- void encode(ProtoWriteBuffer buffer) const override;
2747
- void calculate_size(uint32_t &total_size) const override;
2748
2551
  #ifdef HAS_PROTO_MESSAGE_DUMP
2749
2552
  void dump_to(std::string &out) const override;
2750
2553
  #endif
@@ -2752,13 +2555,14 @@ class TextCommandRequest : public ProtoMessage {
2752
2555
  protected:
2753
2556
  bool decode_32bit(uint32_t field_id, Proto32Bit value) override;
2754
2557
  bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override;
2558
+ bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
2755
2559
  };
2756
2560
  #endif
2757
2561
  #ifdef USE_DATETIME_DATE
2758
2562
  class ListEntitiesDateResponse : public InfoResponseProtoMessage {
2759
2563
  public:
2760
- static constexpr uint16_t MESSAGE_TYPE = 100;
2761
- static constexpr uint16_t ESTIMATED_SIZE = 49;
2564
+ static constexpr uint8_t MESSAGE_TYPE = 100;
2565
+ static constexpr uint8_t ESTIMATED_SIZE = 49;
2762
2566
  #ifdef HAS_PROTO_MESSAGE_DUMP
2763
2567
  const char *message_name() const override { return "list_entities_date_response"; }
2764
2568
  #endif
@@ -2769,14 +2573,11 @@ class ListEntitiesDateResponse : public InfoResponseProtoMessage {
2769
2573
  #endif
2770
2574
 
2771
2575
  protected:
2772
- bool decode_32bit(uint32_t field_id, Proto32Bit value) override;
2773
- bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override;
2774
- bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
2775
2576
  };
2776
2577
  class DateStateResponse : public StateResponseProtoMessage {
2777
2578
  public:
2778
- static constexpr uint16_t MESSAGE_TYPE = 101;
2779
- static constexpr uint16_t ESTIMATED_SIZE = 23;
2579
+ static constexpr uint8_t MESSAGE_TYPE = 101;
2580
+ static constexpr uint8_t ESTIMATED_SIZE = 23;
2780
2581
  #ifdef HAS_PROTO_MESSAGE_DUMP
2781
2582
  const char *message_name() const override { return "date_state_response"; }
2782
2583
  #endif
@@ -2791,22 +2592,17 @@ class DateStateResponse : public StateResponseProtoMessage {
2791
2592
  #endif
2792
2593
 
2793
2594
  protected:
2794
- bool decode_32bit(uint32_t field_id, Proto32Bit value) override;
2795
- bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
2796
2595
  };
2797
- class DateCommandRequest : public ProtoMessage {
2596
+ class DateCommandRequest : public CommandProtoMessage {
2798
2597
  public:
2799
- static constexpr uint16_t MESSAGE_TYPE = 102;
2800
- static constexpr uint16_t ESTIMATED_SIZE = 17;
2598
+ static constexpr uint8_t MESSAGE_TYPE = 102;
2599
+ static constexpr uint8_t ESTIMATED_SIZE = 21;
2801
2600
  #ifdef HAS_PROTO_MESSAGE_DUMP
2802
2601
  const char *message_name() const override { return "date_command_request"; }
2803
2602
  #endif
2804
- uint32_t key{0};
2805
2603
  uint32_t year{0};
2806
2604
  uint32_t month{0};
2807
2605
  uint32_t day{0};
2808
- void encode(ProtoWriteBuffer buffer) const override;
2809
- void calculate_size(uint32_t &total_size) const override;
2810
2606
  #ifdef HAS_PROTO_MESSAGE_DUMP
2811
2607
  void dump_to(std::string &out) const override;
2812
2608
  #endif
@@ -2819,8 +2615,8 @@ class DateCommandRequest : public ProtoMessage {
2819
2615
  #ifdef USE_DATETIME_TIME
2820
2616
  class ListEntitiesTimeResponse : public InfoResponseProtoMessage {
2821
2617
  public:
2822
- static constexpr uint16_t MESSAGE_TYPE = 103;
2823
- static constexpr uint16_t ESTIMATED_SIZE = 49;
2618
+ static constexpr uint8_t MESSAGE_TYPE = 103;
2619
+ static constexpr uint8_t ESTIMATED_SIZE = 49;
2824
2620
  #ifdef HAS_PROTO_MESSAGE_DUMP
2825
2621
  const char *message_name() const override { return "list_entities_time_response"; }
2826
2622
  #endif
@@ -2831,14 +2627,11 @@ class ListEntitiesTimeResponse : public InfoResponseProtoMessage {
2831
2627
  #endif
2832
2628
 
2833
2629
  protected:
2834
- bool decode_32bit(uint32_t field_id, Proto32Bit value) override;
2835
- bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override;
2836
- bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
2837
2630
  };
2838
2631
  class TimeStateResponse : public StateResponseProtoMessage {
2839
2632
  public:
2840
- static constexpr uint16_t MESSAGE_TYPE = 104;
2841
- static constexpr uint16_t ESTIMATED_SIZE = 23;
2633
+ static constexpr uint8_t MESSAGE_TYPE = 104;
2634
+ static constexpr uint8_t ESTIMATED_SIZE = 23;
2842
2635
  #ifdef HAS_PROTO_MESSAGE_DUMP
2843
2636
  const char *message_name() const override { return "time_state_response"; }
2844
2637
  #endif
@@ -2853,22 +2646,17 @@ class TimeStateResponse : public StateResponseProtoMessage {
2853
2646
  #endif
2854
2647
 
2855
2648
  protected:
2856
- bool decode_32bit(uint32_t field_id, Proto32Bit value) override;
2857
- bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
2858
2649
  };
2859
- class TimeCommandRequest : public ProtoMessage {
2650
+ class TimeCommandRequest : public CommandProtoMessage {
2860
2651
  public:
2861
- static constexpr uint16_t MESSAGE_TYPE = 105;
2862
- static constexpr uint16_t ESTIMATED_SIZE = 17;
2652
+ static constexpr uint8_t MESSAGE_TYPE = 105;
2653
+ static constexpr uint8_t ESTIMATED_SIZE = 21;
2863
2654
  #ifdef HAS_PROTO_MESSAGE_DUMP
2864
2655
  const char *message_name() const override { return "time_command_request"; }
2865
2656
  #endif
2866
- uint32_t key{0};
2867
2657
  uint32_t hour{0};
2868
2658
  uint32_t minute{0};
2869
2659
  uint32_t second{0};
2870
- void encode(ProtoWriteBuffer buffer) const override;
2871
- void calculate_size(uint32_t &total_size) const override;
2872
2660
  #ifdef HAS_PROTO_MESSAGE_DUMP
2873
2661
  void dump_to(std::string &out) const override;
2874
2662
  #endif
@@ -2881,8 +2669,8 @@ class TimeCommandRequest : public ProtoMessage {
2881
2669
  #ifdef USE_EVENT
2882
2670
  class ListEntitiesEventResponse : public InfoResponseProtoMessage {
2883
2671
  public:
2884
- static constexpr uint16_t MESSAGE_TYPE = 107;
2885
- static constexpr uint16_t ESTIMATED_SIZE = 76;
2672
+ static constexpr uint8_t MESSAGE_TYPE = 107;
2673
+ static constexpr uint8_t ESTIMATED_SIZE = 76;
2886
2674
  #ifdef HAS_PROTO_MESSAGE_DUMP
2887
2675
  const char *message_name() const override { return "list_entities_event_response"; }
2888
2676
  #endif
@@ -2895,14 +2683,11 @@ class ListEntitiesEventResponse : public InfoResponseProtoMessage {
2895
2683
  #endif
2896
2684
 
2897
2685
  protected:
2898
- bool decode_32bit(uint32_t field_id, Proto32Bit value) override;
2899
- bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override;
2900
- bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
2901
2686
  };
2902
2687
  class EventResponse : public StateResponseProtoMessage {
2903
2688
  public:
2904
- static constexpr uint16_t MESSAGE_TYPE = 108;
2905
- static constexpr uint16_t ESTIMATED_SIZE = 18;
2689
+ static constexpr uint8_t MESSAGE_TYPE = 108;
2690
+ static constexpr uint8_t ESTIMATED_SIZE = 18;
2906
2691
  #ifdef HAS_PROTO_MESSAGE_DUMP
2907
2692
  const char *message_name() const override { return "event_response"; }
2908
2693
  #endif
@@ -2914,16 +2699,13 @@ class EventResponse : public StateResponseProtoMessage {
2914
2699
  #endif
2915
2700
 
2916
2701
  protected:
2917
- bool decode_32bit(uint32_t field_id, Proto32Bit value) override;
2918
- bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override;
2919
- bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
2920
2702
  };
2921
2703
  #endif
2922
2704
  #ifdef USE_VALVE
2923
2705
  class ListEntitiesValveResponse : public InfoResponseProtoMessage {
2924
2706
  public:
2925
- static constexpr uint16_t MESSAGE_TYPE = 109;
2926
- static constexpr uint16_t ESTIMATED_SIZE = 64;
2707
+ static constexpr uint8_t MESSAGE_TYPE = 109;
2708
+ static constexpr uint8_t ESTIMATED_SIZE = 64;
2927
2709
  #ifdef HAS_PROTO_MESSAGE_DUMP
2928
2710
  const char *message_name() const override { return "list_entities_valve_response"; }
2929
2711
  #endif
@@ -2938,14 +2720,11 @@ class ListEntitiesValveResponse : public InfoResponseProtoMessage {
2938
2720
  #endif
2939
2721
 
2940
2722
  protected:
2941
- bool decode_32bit(uint32_t field_id, Proto32Bit value) override;
2942
- bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override;
2943
- bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
2944
2723
  };
2945
2724
  class ValveStateResponse : public StateResponseProtoMessage {
2946
2725
  public:
2947
- static constexpr uint16_t MESSAGE_TYPE = 110;
2948
- static constexpr uint16_t ESTIMATED_SIZE = 16;
2726
+ static constexpr uint8_t MESSAGE_TYPE = 110;
2727
+ static constexpr uint8_t ESTIMATED_SIZE = 16;
2949
2728
  #ifdef HAS_PROTO_MESSAGE_DUMP
2950
2729
  const char *message_name() const override { return "valve_state_response"; }
2951
2730
  #endif
@@ -2958,22 +2737,17 @@ class ValveStateResponse : public StateResponseProtoMessage {
2958
2737
  #endif
2959
2738
 
2960
2739
  protected:
2961
- bool decode_32bit(uint32_t field_id, Proto32Bit value) override;
2962
- bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
2963
2740
  };
2964
- class ValveCommandRequest : public ProtoMessage {
2741
+ class ValveCommandRequest : public CommandProtoMessage {
2965
2742
  public:
2966
- static constexpr uint16_t MESSAGE_TYPE = 111;
2967
- static constexpr uint16_t ESTIMATED_SIZE = 14;
2743
+ static constexpr uint8_t MESSAGE_TYPE = 111;
2744
+ static constexpr uint8_t ESTIMATED_SIZE = 18;
2968
2745
  #ifdef HAS_PROTO_MESSAGE_DUMP
2969
2746
  const char *message_name() const override { return "valve_command_request"; }
2970
2747
  #endif
2971
- uint32_t key{0};
2972
2748
  bool has_position{false};
2973
2749
  float position{0.0f};
2974
2750
  bool stop{false};
2975
- void encode(ProtoWriteBuffer buffer) const override;
2976
- void calculate_size(uint32_t &total_size) const override;
2977
2751
  #ifdef HAS_PROTO_MESSAGE_DUMP
2978
2752
  void dump_to(std::string &out) const override;
2979
2753
  #endif
@@ -2986,8 +2760,8 @@ class ValveCommandRequest : public ProtoMessage {
2986
2760
  #ifdef USE_DATETIME_DATETIME
2987
2761
  class ListEntitiesDateTimeResponse : public InfoResponseProtoMessage {
2988
2762
  public:
2989
- static constexpr uint16_t MESSAGE_TYPE = 112;
2990
- static constexpr uint16_t ESTIMATED_SIZE = 49;
2763
+ static constexpr uint8_t MESSAGE_TYPE = 112;
2764
+ static constexpr uint8_t ESTIMATED_SIZE = 49;
2991
2765
  #ifdef HAS_PROTO_MESSAGE_DUMP
2992
2766
  const char *message_name() const override { return "list_entities_date_time_response"; }
2993
2767
  #endif
@@ -2998,14 +2772,11 @@ class ListEntitiesDateTimeResponse : public InfoResponseProtoMessage {
2998
2772
  #endif
2999
2773
 
3000
2774
  protected:
3001
- bool decode_32bit(uint32_t field_id, Proto32Bit value) override;
3002
- bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override;
3003
- bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
3004
2775
  };
3005
2776
  class DateTimeStateResponse : public StateResponseProtoMessage {
3006
2777
  public:
3007
- static constexpr uint16_t MESSAGE_TYPE = 113;
3008
- static constexpr uint16_t ESTIMATED_SIZE = 16;
2778
+ static constexpr uint8_t MESSAGE_TYPE = 113;
2779
+ static constexpr uint8_t ESTIMATED_SIZE = 16;
3009
2780
  #ifdef HAS_PROTO_MESSAGE_DUMP
3010
2781
  const char *message_name() const override { return "date_time_state_response"; }
3011
2782
  #endif
@@ -3018,33 +2789,29 @@ class DateTimeStateResponse : public StateResponseProtoMessage {
3018
2789
  #endif
3019
2790
 
3020
2791
  protected:
3021
- bool decode_32bit(uint32_t field_id, Proto32Bit value) override;
3022
- bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
3023
2792
  };
3024
- class DateTimeCommandRequest : public ProtoMessage {
2793
+ class DateTimeCommandRequest : public CommandProtoMessage {
3025
2794
  public:
3026
- static constexpr uint16_t MESSAGE_TYPE = 114;
3027
- static constexpr uint16_t ESTIMATED_SIZE = 10;
2795
+ static constexpr uint8_t MESSAGE_TYPE = 114;
2796
+ static constexpr uint8_t ESTIMATED_SIZE = 14;
3028
2797
  #ifdef HAS_PROTO_MESSAGE_DUMP
3029
2798
  const char *message_name() const override { return "date_time_command_request"; }
3030
2799
  #endif
3031
- uint32_t key{0};
3032
2800
  uint32_t epoch_seconds{0};
3033
- void encode(ProtoWriteBuffer buffer) const override;
3034
- void calculate_size(uint32_t &total_size) const override;
3035
2801
  #ifdef HAS_PROTO_MESSAGE_DUMP
3036
2802
  void dump_to(std::string &out) const override;
3037
2803
  #endif
3038
2804
 
3039
2805
  protected:
3040
2806
  bool decode_32bit(uint32_t field_id, Proto32Bit value) override;
2807
+ bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
3041
2808
  };
3042
2809
  #endif
3043
2810
  #ifdef USE_UPDATE
3044
2811
  class ListEntitiesUpdateResponse : public InfoResponseProtoMessage {
3045
2812
  public:
3046
- static constexpr uint16_t MESSAGE_TYPE = 116;
3047
- static constexpr uint16_t ESTIMATED_SIZE = 58;
2813
+ static constexpr uint8_t MESSAGE_TYPE = 116;
2814
+ static constexpr uint8_t ESTIMATED_SIZE = 58;
3048
2815
  #ifdef HAS_PROTO_MESSAGE_DUMP
3049
2816
  const char *message_name() const override { return "list_entities_update_response"; }
3050
2817
  #endif
@@ -3056,14 +2823,11 @@ class ListEntitiesUpdateResponse : public InfoResponseProtoMessage {
3056
2823
  #endif
3057
2824
 
3058
2825
  protected:
3059
- bool decode_32bit(uint32_t field_id, Proto32Bit value) override;
3060
- bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override;
3061
- bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
3062
2826
  };
3063
2827
  class UpdateStateResponse : public StateResponseProtoMessage {
3064
2828
  public:
3065
- static constexpr uint16_t MESSAGE_TYPE = 117;
3066
- static constexpr uint16_t ESTIMATED_SIZE = 65;
2829
+ static constexpr uint8_t MESSAGE_TYPE = 117;
2830
+ static constexpr uint8_t ESTIMATED_SIZE = 65;
3067
2831
  #ifdef HAS_PROTO_MESSAGE_DUMP
3068
2832
  const char *message_name() const override { return "update_state_response"; }
3069
2833
  #endif
@@ -3083,21 +2847,15 @@ class UpdateStateResponse : public StateResponseProtoMessage {
3083
2847
  #endif
3084
2848
 
3085
2849
  protected:
3086
- bool decode_32bit(uint32_t field_id, Proto32Bit value) override;
3087
- bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override;
3088
- bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
3089
2850
  };
3090
- class UpdateCommandRequest : public ProtoMessage {
2851
+ class UpdateCommandRequest : public CommandProtoMessage {
3091
2852
  public:
3092
- static constexpr uint16_t MESSAGE_TYPE = 118;
3093
- static constexpr uint16_t ESTIMATED_SIZE = 7;
2853
+ static constexpr uint8_t MESSAGE_TYPE = 118;
2854
+ static constexpr uint8_t ESTIMATED_SIZE = 11;
3094
2855
  #ifdef HAS_PROTO_MESSAGE_DUMP
3095
2856
  const char *message_name() const override { return "update_command_request"; }
3096
2857
  #endif
3097
- uint32_t key{0};
3098
2858
  enums::UpdateCommand command{};
3099
- void encode(ProtoWriteBuffer buffer) const override;
3100
- void calculate_size(uint32_t &total_size) const override;
3101
2859
  #ifdef HAS_PROTO_MESSAGE_DUMP
3102
2860
  void dump_to(std::string &out) const override;
3103
2861
  #endif