ESPHome  2022.11.3
api_pb2.h
Go to the documentation of this file.
1 // This file was automatically generated with a tool.
2 // See scripts/api_protobuf/api_protobuf.py
3 #pragma once
4 
5 #include "proto.h"
6 
7 namespace esphome {
8 namespace api {
9 
10 namespace enums {
11 
12 enum EntityCategory : uint32_t {
16 };
17 enum LegacyCoverState : uint32_t {
20 };
21 enum CoverOperation : uint32_t {
25 };
26 enum LegacyCoverCommand : uint32_t {
30 };
31 enum FanSpeed : uint32_t {
35 };
36 enum FanDirection : uint32_t {
39 };
40 enum ColorMode : uint32_t {
51 };
52 enum SensorStateClass : uint32_t {
57 };
58 enum SensorLastResetType : uint32_t {
62 };
63 enum LogLevel : uint32_t {
72 };
73 enum ServiceArgType : uint32_t {
82 };
83 enum ClimateMode : uint32_t {
91 };
92 enum ClimateFanMode : uint32_t {
102 };
103 enum ClimateSwingMode : uint32_t {
108 };
109 enum ClimateAction : uint32_t {
116 };
117 enum ClimatePreset : uint32_t {
126 };
127 enum NumberMode : uint32_t {
131 };
132 enum LockState : uint32_t {
139 };
140 enum LockCommand : uint32_t {
144 };
145 enum MediaPlayerState : uint32_t {
150 };
151 enum MediaPlayerCommand : uint32_t {
157 };
158 enum BluetoothDeviceRequestType : uint32_t {
163 };
164 
165 } // namespace enums
166 
167 class HelloRequest : public ProtoMessage {
168  public:
169  std::string client_info{};
170  uint32_t api_version_major{0};
171  uint32_t api_version_minor{0};
172  void encode(ProtoWriteBuffer buffer) const override;
173 #ifdef HAS_PROTO_MESSAGE_DUMP
174  void dump_to(std::string &out) const override;
175 #endif
176 
177  protected:
178  bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override;
179  bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
180 };
181 class HelloResponse : public ProtoMessage {
182  public:
183  uint32_t api_version_major{0};
184  uint32_t api_version_minor{0};
185  std::string server_info{};
186  std::string name{};
187  void encode(ProtoWriteBuffer buffer) const override;
188 #ifdef HAS_PROTO_MESSAGE_DUMP
189  void dump_to(std::string &out) const override;
190 #endif
191 
192  protected:
193  bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override;
194  bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
195 };
196 class ConnectRequest : public ProtoMessage {
197  public:
198  std::string password{};
199  void encode(ProtoWriteBuffer buffer) const override;
200 #ifdef HAS_PROTO_MESSAGE_DUMP
201  void dump_to(std::string &out) const override;
202 #endif
203 
204  protected:
205  bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override;
206 };
208  public:
209  bool invalid_password{false};
210  void encode(ProtoWriteBuffer buffer) const override;
211 #ifdef HAS_PROTO_MESSAGE_DUMP
212  void dump_to(std::string &out) const override;
213 #endif
214 
215  protected:
216  bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
217 };
219  public:
220  void encode(ProtoWriteBuffer buffer) const override;
221 #ifdef HAS_PROTO_MESSAGE_DUMP
222  void dump_to(std::string &out) const override;
223 #endif
224 
225  protected:
226 };
228  public:
229  void encode(ProtoWriteBuffer buffer) const override;
230 #ifdef HAS_PROTO_MESSAGE_DUMP
231  void dump_to(std::string &out) const override;
232 #endif
233 
234  protected:
235 };
236 class PingRequest : public ProtoMessage {
237  public:
238  void encode(ProtoWriteBuffer buffer) const override;
239 #ifdef HAS_PROTO_MESSAGE_DUMP
240  void dump_to(std::string &out) const override;
241 #endif
242 
243  protected:
244 };
245 class PingResponse : public ProtoMessage {
246  public:
247  void encode(ProtoWriteBuffer buffer) const override;
248 #ifdef HAS_PROTO_MESSAGE_DUMP
249  void dump_to(std::string &out) const override;
250 #endif
251 
252  protected:
253 };
255  public:
256  void encode(ProtoWriteBuffer buffer) const override;
257 #ifdef HAS_PROTO_MESSAGE_DUMP
258  void dump_to(std::string &out) const override;
259 #endif
260 
261  protected:
262 };
264  public:
265  bool uses_password{false};
266  std::string name{};
267  std::string mac_address{};
268  std::string esphome_version{};
269  std::string compilation_time{};
270  std::string model{};
271  bool has_deep_sleep{false};
272  std::string project_name{};
273  std::string project_version{};
274  uint32_t webserver_port{0};
275  uint32_t bluetooth_proxy_version{0};
276  std::string manufacturer{};
277  void encode(ProtoWriteBuffer buffer) const override;
278 #ifdef HAS_PROTO_MESSAGE_DUMP
279  void dump_to(std::string &out) const override;
280 #endif
281 
282  protected:
283  bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override;
284  bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
285 };
287  public:
288  void encode(ProtoWriteBuffer buffer) const override;
289 #ifdef HAS_PROTO_MESSAGE_DUMP
290  void dump_to(std::string &out) const override;
291 #endif
292 
293  protected:
294 };
296  public:
297  void encode(ProtoWriteBuffer buffer) const override;
298 #ifdef HAS_PROTO_MESSAGE_DUMP
299  void dump_to(std::string &out) const override;
300 #endif
301 
302  protected:
303 };
305  public:
306  void encode(ProtoWriteBuffer buffer) const override;
307 #ifdef HAS_PROTO_MESSAGE_DUMP
308  void dump_to(std::string &out) const override;
309 #endif
310 
311  protected:
312 };
314  public:
315  std::string object_id{};
316  uint32_t key{0};
317  std::string name{};
318  std::string unique_id{};
319  std::string device_class{};
320  bool is_status_binary_sensor{false};
321  bool disabled_by_default{false};
322  std::string icon{};
323  enums::EntityCategory entity_category{};
324  void encode(ProtoWriteBuffer buffer) const override;
325 #ifdef HAS_PROTO_MESSAGE_DUMP
326  void dump_to(std::string &out) const override;
327 #endif
328 
329  protected:
330  bool decode_32bit(uint32_t field_id, Proto32Bit value) override;
331  bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override;
332  bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
333 };
335  public:
336  uint32_t key{0};
337  bool state{false};
338  bool missing_state{false};
339  void encode(ProtoWriteBuffer buffer) const override;
340 #ifdef HAS_PROTO_MESSAGE_DUMP
341  void dump_to(std::string &out) const override;
342 #endif
343 
344  protected:
345  bool decode_32bit(uint32_t field_id, Proto32Bit value) override;
346  bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
347 };
349  public:
350  std::string object_id{};
351  uint32_t key{0};
352  std::string name{};
353  std::string unique_id{};
354  bool assumed_state{false};
355  bool supports_position{false};
356  bool supports_tilt{false};
357  std::string device_class{};
358  bool disabled_by_default{false};
359  std::string icon{};
360  enums::EntityCategory entity_category{};
361  void encode(ProtoWriteBuffer buffer) const override;
362 #ifdef HAS_PROTO_MESSAGE_DUMP
363  void dump_to(std::string &out) const override;
364 #endif
365 
366  protected:
367  bool decode_32bit(uint32_t field_id, Proto32Bit value) override;
368  bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override;
369  bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
370 };
372  public:
373  uint32_t key{0};
374  enums::LegacyCoverState legacy_state{};
375  float position{0.0f};
376  float tilt{0.0f};
377  enums::CoverOperation current_operation{};
378  void encode(ProtoWriteBuffer buffer) const override;
379 #ifdef HAS_PROTO_MESSAGE_DUMP
380  void dump_to(std::string &out) const override;
381 #endif
382 
383  protected:
384  bool decode_32bit(uint32_t field_id, Proto32Bit value) override;
385  bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
386 };
388  public:
389  uint32_t key{0};
390  bool has_legacy_command{false};
391  enums::LegacyCoverCommand legacy_command{};
392  bool has_position{false};
393  float position{0.0f};
394  bool has_tilt{false};
395  float tilt{0.0f};
396  bool stop{false};
397  void encode(ProtoWriteBuffer buffer) const override;
398 #ifdef HAS_PROTO_MESSAGE_DUMP
399  void dump_to(std::string &out) const override;
400 #endif
401 
402  protected:
403  bool decode_32bit(uint32_t field_id, Proto32Bit value) override;
404  bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
405 };
407  public:
408  std::string object_id{};
409  uint32_t key{0};
410  std::string name{};
411  std::string unique_id{};
412  bool supports_oscillation{false};
413  bool supports_speed{false};
414  bool supports_direction{false};
415  int32_t supported_speed_count{0};
416  bool disabled_by_default{false};
417  std::string icon{};
418  enums::EntityCategory entity_category{};
419  void encode(ProtoWriteBuffer buffer) const override;
420 #ifdef HAS_PROTO_MESSAGE_DUMP
421  void dump_to(std::string &out) const override;
422 #endif
423 
424  protected:
425  bool decode_32bit(uint32_t field_id, Proto32Bit value) override;
426  bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override;
427  bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
428 };
430  public:
431  uint32_t key{0};
432  bool state{false};
433  bool oscillating{false};
436  int32_t speed_level{0};
437  void encode(ProtoWriteBuffer buffer) const override;
438 #ifdef HAS_PROTO_MESSAGE_DUMP
439  void dump_to(std::string &out) const override;
440 #endif
441 
442  protected:
443  bool decode_32bit(uint32_t field_id, Proto32Bit value) override;
444  bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
445 };
447  public:
448  uint32_t key{0};
449  bool has_state{false};
450  bool state{false};
451  bool has_speed{false};
453  bool has_oscillating{false};
454  bool oscillating{false};
455  bool has_direction{false};
457  bool has_speed_level{false};
458  int32_t speed_level{0};
459  void encode(ProtoWriteBuffer buffer) const override;
460 #ifdef HAS_PROTO_MESSAGE_DUMP
461  void dump_to(std::string &out) const override;
462 #endif
463 
464  protected:
465  bool decode_32bit(uint32_t field_id, Proto32Bit value) override;
466  bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
467 };
469  public:
470  std::string object_id{};
471  uint32_t key{0};
472  std::string name{};
473  std::string unique_id{};
474  std::vector<enums::ColorMode> supported_color_modes{};
475  bool legacy_supports_brightness{false};
476  bool legacy_supports_rgb{false};
477  bool legacy_supports_white_value{false};
478  bool legacy_supports_color_temperature{false};
479  float min_mireds{0.0f};
480  float max_mireds{0.0f};
481  std::vector<std::string> effects{};
482  bool disabled_by_default{false};
483  std::string icon{};
484  enums::EntityCategory entity_category{};
485  void encode(ProtoWriteBuffer buffer) const override;
486 #ifdef HAS_PROTO_MESSAGE_DUMP
487  void dump_to(std::string &out) const override;
488 #endif
489 
490  protected:
491  bool decode_32bit(uint32_t field_id, Proto32Bit value) override;
492  bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override;
493  bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
494 };
496  public:
497  uint32_t key{0};
498  bool state{false};
499  float brightness{0.0f};
500  enums::ColorMode color_mode{};
501  float color_brightness{0.0f};
502  float red{0.0f};
503  float green{0.0f};
504  float blue{0.0f};
505  float white{0.0f};
506  float color_temperature{0.0f};
507  float cold_white{0.0f};
508  float warm_white{0.0f};
509  std::string effect{};
510  void encode(ProtoWriteBuffer buffer) const override;
511 #ifdef HAS_PROTO_MESSAGE_DUMP
512  void dump_to(std::string &out) const override;
513 #endif
514 
515  protected:
516  bool decode_32bit(uint32_t field_id, Proto32Bit value) override;
517  bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override;
518  bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
519 };
521  public:
522  uint32_t key{0};
523  bool has_state{false};
524  bool state{false};
525  bool has_brightness{false};
526  float brightness{0.0f};
527  bool has_color_mode{false};
528  enums::ColorMode color_mode{};
529  bool has_color_brightness{false};
530  float color_brightness{0.0f};
531  bool has_rgb{false};
532  float red{0.0f};
533  float green{0.0f};
534  float blue{0.0f};
535  bool has_white{false};
536  float white{0.0f};
537  bool has_color_temperature{false};
538  float color_temperature{0.0f};
539  bool has_cold_white{false};
540  float cold_white{0.0f};
541  bool has_warm_white{false};
542  float warm_white{0.0f};
543  bool has_transition_length{false};
544  uint32_t transition_length{0};
545  bool has_flash_length{false};
546  uint32_t flash_length{0};
547  bool has_effect{false};
548  std::string effect{};
549  void encode(ProtoWriteBuffer buffer) const override;
550 #ifdef HAS_PROTO_MESSAGE_DUMP
551  void dump_to(std::string &out) const override;
552 #endif
553 
554  protected:
555  bool decode_32bit(uint32_t field_id, Proto32Bit value) override;
556  bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override;
557  bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
558 };
560  public:
561  std::string object_id{};
562  uint32_t key{0};
563  std::string name{};
564  std::string unique_id{};
565  std::string icon{};
566  std::string unit_of_measurement{};
567  int32_t accuracy_decimals{0};
568  bool force_update{false};
569  std::string device_class{};
570  enums::SensorStateClass state_class{};
571  enums::SensorLastResetType legacy_last_reset_type{};
572  bool disabled_by_default{false};
573  enums::EntityCategory entity_category{};
574  void encode(ProtoWriteBuffer buffer) const override;
575 #ifdef HAS_PROTO_MESSAGE_DUMP
576  void dump_to(std::string &out) const override;
577 #endif
578 
579  protected:
580  bool decode_32bit(uint32_t field_id, Proto32Bit value) override;
581  bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override;
582  bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
583 };
585  public:
586  uint32_t key{0};
587  float state{0.0f};
588  bool missing_state{false};
589  void encode(ProtoWriteBuffer buffer) const override;
590 #ifdef HAS_PROTO_MESSAGE_DUMP
591  void dump_to(std::string &out) const override;
592 #endif
593 
594  protected:
595  bool decode_32bit(uint32_t field_id, Proto32Bit value) override;
596  bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
597 };
599  public:
600  std::string object_id{};
601  uint32_t key{0};
602  std::string name{};
603  std::string unique_id{};
604  std::string icon{};
605  bool assumed_state{false};
606  bool disabled_by_default{false};
607  enums::EntityCategory entity_category{};
608  std::string device_class{};
609  void encode(ProtoWriteBuffer buffer) const override;
610 #ifdef HAS_PROTO_MESSAGE_DUMP
611  void dump_to(std::string &out) const override;
612 #endif
613 
614  protected:
615  bool decode_32bit(uint32_t field_id, Proto32Bit value) override;
616  bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override;
617  bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
618 };
620  public:
621  uint32_t key{0};
622  bool state{false};
623  void encode(ProtoWriteBuffer buffer) const override;
624 #ifdef HAS_PROTO_MESSAGE_DUMP
625  void dump_to(std::string &out) const override;
626 #endif
627 
628  protected:
629  bool decode_32bit(uint32_t field_id, Proto32Bit value) override;
630  bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
631 };
633  public:
634  uint32_t key{0};
635  bool state{false};
636  void encode(ProtoWriteBuffer buffer) const override;
637 #ifdef HAS_PROTO_MESSAGE_DUMP
638  void dump_to(std::string &out) const override;
639 #endif
640 
641  protected:
642  bool decode_32bit(uint32_t field_id, Proto32Bit value) override;
643  bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
644 };
646  public:
647  std::string object_id{};
648  uint32_t key{0};
649  std::string name{};
650  std::string unique_id{};
651  std::string icon{};
652  bool disabled_by_default{false};
653  enums::EntityCategory entity_category{};
654  void encode(ProtoWriteBuffer buffer) const override;
655 #ifdef HAS_PROTO_MESSAGE_DUMP
656  void dump_to(std::string &out) const override;
657 #endif
658 
659  protected:
660  bool decode_32bit(uint32_t field_id, Proto32Bit value) override;
661  bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override;
662  bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
663 };
665  public:
666  uint32_t key{0};
667  std::string state{};
668  bool missing_state{false};
669  void encode(ProtoWriteBuffer buffer) const override;
670 #ifdef HAS_PROTO_MESSAGE_DUMP
671  void dump_to(std::string &out) const override;
672 #endif
673 
674  protected:
675  bool decode_32bit(uint32_t field_id, Proto32Bit value) override;
676  bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override;
677  bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
678 };
680  public:
682  bool dump_config{false};
683  void encode(ProtoWriteBuffer buffer) const override;
684 #ifdef HAS_PROTO_MESSAGE_DUMP
685  void dump_to(std::string &out) const override;
686 #endif
687 
688  protected:
689  bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
690 };
692  public:
694  std::string message{};
695  bool send_failed{false};
696  void encode(ProtoWriteBuffer buffer) const override;
697 #ifdef HAS_PROTO_MESSAGE_DUMP
698  void dump_to(std::string &out) const override;
699 #endif
700 
701  protected:
702  bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override;
703  bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
704 };
706  public:
707  void encode(ProtoWriteBuffer buffer) const override;
708 #ifdef HAS_PROTO_MESSAGE_DUMP
709  void dump_to(std::string &out) const override;
710 #endif
711 
712  protected:
713 };
715  public:
716  std::string key{};
717  std::string value{};
718  void encode(ProtoWriteBuffer buffer) const override;
719 #ifdef HAS_PROTO_MESSAGE_DUMP
720  void dump_to(std::string &out) const override;
721 #endif
722 
723  protected:
724  bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override;
725 };
727  public:
728  std::string service{};
729  std::vector<HomeassistantServiceMap> data{};
730  std::vector<HomeassistantServiceMap> data_template{};
731  std::vector<HomeassistantServiceMap> variables{};
732  bool is_event{false};
733  void encode(ProtoWriteBuffer buffer) const override;
734 #ifdef HAS_PROTO_MESSAGE_DUMP
735  void dump_to(std::string &out) const override;
736 #endif
737 
738  protected:
739  bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override;
740  bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
741 };
743  public:
744  void encode(ProtoWriteBuffer buffer) const override;
745 #ifdef HAS_PROTO_MESSAGE_DUMP
746  void dump_to(std::string &out) const override;
747 #endif
748 
749  protected:
750 };
752  public:
753  std::string entity_id{};
754  std::string attribute{};
755  void encode(ProtoWriteBuffer buffer) const override;
756 #ifdef HAS_PROTO_MESSAGE_DUMP
757  void dump_to(std::string &out) const override;
758 #endif
759 
760  protected:
761  bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override;
762 };
764  public:
765  std::string entity_id{};
766  std::string state{};
767  std::string attribute{};
768  void encode(ProtoWriteBuffer buffer) const override;
769 #ifdef HAS_PROTO_MESSAGE_DUMP
770  void dump_to(std::string &out) const override;
771 #endif
772 
773  protected:
774  bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override;
775 };
776 class GetTimeRequest : public ProtoMessage {
777  public:
778  void encode(ProtoWriteBuffer buffer) const override;
779 #ifdef HAS_PROTO_MESSAGE_DUMP
780  void dump_to(std::string &out) const override;
781 #endif
782 
783  protected:
784 };
786  public:
787  uint32_t epoch_seconds{0};
788  void encode(ProtoWriteBuffer buffer) const override;
789 #ifdef HAS_PROTO_MESSAGE_DUMP
790  void dump_to(std::string &out) const override;
791 #endif
792 
793  protected:
794  bool decode_32bit(uint32_t field_id, Proto32Bit value) override;
795 };
797  public:
798  std::string name{};
800  void encode(ProtoWriteBuffer buffer) const override;
801 #ifdef HAS_PROTO_MESSAGE_DUMP
802  void dump_to(std::string &out) const override;
803 #endif
804 
805  protected:
806  bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override;
807  bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
808 };
810  public:
811  std::string name{};
812  uint32_t key{0};
813  std::vector<ListEntitiesServicesArgument> args{};
814  void encode(ProtoWriteBuffer buffer) const override;
815 #ifdef HAS_PROTO_MESSAGE_DUMP
816  void dump_to(std::string &out) const override;
817 #endif
818 
819  protected:
820  bool decode_32bit(uint32_t field_id, Proto32Bit value) override;
821  bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override;
822 };
824  public:
825  bool bool_{false};
826  int32_t legacy_int{0};
827  float float_{0.0f};
828  std::string string_{};
829  int32_t int_{0};
830  std::vector<bool> bool_array{};
831  std::vector<int32_t> int_array{};
832  std::vector<float> float_array{};
833  std::vector<std::string> string_array{};
834  void encode(ProtoWriteBuffer buffer) const override;
835 #ifdef HAS_PROTO_MESSAGE_DUMP
836  void dump_to(std::string &out) const override;
837 #endif
838 
839  protected:
840  bool decode_32bit(uint32_t field_id, Proto32Bit value) override;
841  bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override;
842  bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
843 };
845  public:
846  uint32_t key{0};
847  std::vector<ExecuteServiceArgument> args{};
848  void encode(ProtoWriteBuffer buffer) const override;
849 #ifdef HAS_PROTO_MESSAGE_DUMP
850  void dump_to(std::string &out) const override;
851 #endif
852 
853  protected:
854  bool decode_32bit(uint32_t field_id, Proto32Bit value) override;
855  bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override;
856 };
858  public:
859  std::string object_id{};
860  uint32_t key{0};
861  std::string name{};
862  std::string unique_id{};
863  bool disabled_by_default{false};
864  std::string icon{};
865  enums::EntityCategory entity_category{};
866  void encode(ProtoWriteBuffer buffer) const override;
867 #ifdef HAS_PROTO_MESSAGE_DUMP
868  void dump_to(std::string &out) const override;
869 #endif
870 
871  protected:
872  bool decode_32bit(uint32_t field_id, Proto32Bit value) override;
873  bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override;
874  bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
875 };
877  public:
878  uint32_t key{0};
879  std::string data{};
880  bool done{false};
881  void encode(ProtoWriteBuffer buffer) const override;
882 #ifdef HAS_PROTO_MESSAGE_DUMP
883  void dump_to(std::string &out) const override;
884 #endif
885 
886  protected:
887  bool decode_32bit(uint32_t field_id, Proto32Bit value) override;
888  bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override;
889  bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
890 };
892  public:
893  bool single{false};
894  bool stream{false};
895  void encode(ProtoWriteBuffer buffer) const override;
896 #ifdef HAS_PROTO_MESSAGE_DUMP
897  void dump_to(std::string &out) const override;
898 #endif
899 
900  protected:
901  bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
902 };
904  public:
905  std::string object_id{};
906  uint32_t key{0};
907  std::string name{};
908  std::string unique_id{};
909  bool supports_current_temperature{false};
910  bool supports_two_point_target_temperature{false};
911  std::vector<enums::ClimateMode> supported_modes{};
912  float visual_min_temperature{0.0f};
913  float visual_max_temperature{0.0f};
914  float visual_temperature_step{0.0f};
915  bool legacy_supports_away{false};
916  bool supports_action{false};
917  std::vector<enums::ClimateFanMode> supported_fan_modes{};
918  std::vector<enums::ClimateSwingMode> supported_swing_modes{};
919  std::vector<std::string> supported_custom_fan_modes{};
920  std::vector<enums::ClimatePreset> supported_presets{};
921  std::vector<std::string> supported_custom_presets{};
922  bool disabled_by_default{false};
923  std::string icon{};
924  enums::EntityCategory entity_category{};
925  void encode(ProtoWriteBuffer buffer) const override;
926 #ifdef HAS_PROTO_MESSAGE_DUMP
927  void dump_to(std::string &out) const override;
928 #endif
929 
930  protected:
931  bool decode_32bit(uint32_t field_id, Proto32Bit value) override;
932  bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override;
933  bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
934 };
936  public:
937  uint32_t key{0};
939  float current_temperature{0.0f};
940  float target_temperature{0.0f};
943  bool legacy_away{false};
947  std::string custom_fan_mode{};
949  std::string custom_preset{};
950  void encode(ProtoWriteBuffer buffer) const override;
951 #ifdef HAS_PROTO_MESSAGE_DUMP
952  void dump_to(std::string &out) const override;
953 #endif
954 
955  protected:
956  bool decode_32bit(uint32_t field_id, Proto32Bit value) override;
957  bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override;
958  bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
959 };
961  public:
962  uint32_t key{0};
963  bool has_mode{false};
965  bool has_target_temperature{false};
966  float target_temperature{0.0f};
967  bool has_target_temperature_low{false};
969  bool has_target_temperature_high{false};
971  bool has_legacy_away{false};
972  bool legacy_away{false};
973  bool has_fan_mode{false};
975  bool has_swing_mode{false};
977  bool has_custom_fan_mode{false};
978  std::string custom_fan_mode{};
979  bool has_preset{false};
981  bool has_custom_preset{false};
982  std::string custom_preset{};
983  void encode(ProtoWriteBuffer buffer) const override;
984 #ifdef HAS_PROTO_MESSAGE_DUMP
985  void dump_to(std::string &out) const override;
986 #endif
987 
988  protected:
989  bool decode_32bit(uint32_t field_id, Proto32Bit value) override;
990  bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override;
991  bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
992 };
994  public:
995  std::string object_id{};
996  uint32_t key{0};
997  std::string name{};
998  std::string unique_id{};
999  std::string icon{};
1000  float min_value{0.0f};
1001  float max_value{0.0f};
1002  float step{0.0f};
1003  bool disabled_by_default{false};
1004  enums::EntityCategory entity_category{};
1005  std::string unit_of_measurement{};
1007  void encode(ProtoWriteBuffer buffer) const override;
1008 #ifdef HAS_PROTO_MESSAGE_DUMP
1009  void dump_to(std::string &out) const override;
1010 #endif
1011 
1012  protected:
1013  bool decode_32bit(uint32_t field_id, Proto32Bit value) override;
1014  bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override;
1015  bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
1016 };
1018  public:
1019  uint32_t key{0};
1020  float state{0.0f};
1021  bool missing_state{false};
1022  void encode(ProtoWriteBuffer buffer) const override;
1023 #ifdef HAS_PROTO_MESSAGE_DUMP
1024  void dump_to(std::string &out) const override;
1025 #endif
1026 
1027  protected:
1028  bool decode_32bit(uint32_t field_id, Proto32Bit value) override;
1029  bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
1030 };
1032  public:
1033  uint32_t key{0};
1034  float state{0.0f};
1035  void encode(ProtoWriteBuffer buffer) const override;
1036 #ifdef HAS_PROTO_MESSAGE_DUMP
1037  void dump_to(std::string &out) const override;
1038 #endif
1039 
1040  protected:
1041  bool decode_32bit(uint32_t field_id, Proto32Bit value) override;
1042 };
1044  public:
1045  std::string object_id{};
1046  uint32_t key{0};
1047  std::string name{};
1048  std::string unique_id{};
1049  std::string icon{};
1050  std::vector<std::string> options{};
1051  bool disabled_by_default{false};
1052  enums::EntityCategory entity_category{};
1053  void encode(ProtoWriteBuffer buffer) const override;
1054 #ifdef HAS_PROTO_MESSAGE_DUMP
1055  void dump_to(std::string &out) const override;
1056 #endif
1057 
1058  protected:
1059  bool decode_32bit(uint32_t field_id, Proto32Bit value) override;
1060  bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override;
1061  bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
1062 };
1064  public:
1065  uint32_t key{0};
1066  std::string state{};
1067  bool missing_state{false};
1068  void encode(ProtoWriteBuffer buffer) const override;
1069 #ifdef HAS_PROTO_MESSAGE_DUMP
1070  void dump_to(std::string &out) const override;
1071 #endif
1072 
1073  protected:
1074  bool decode_32bit(uint32_t field_id, Proto32Bit value) override;
1075  bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override;
1076  bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
1077 };
1079  public:
1080  uint32_t key{0};
1081  std::string state{};
1082  void encode(ProtoWriteBuffer buffer) const override;
1083 #ifdef HAS_PROTO_MESSAGE_DUMP
1084  void dump_to(std::string &out) const override;
1085 #endif
1086 
1087  protected:
1088  bool decode_32bit(uint32_t field_id, Proto32Bit value) override;
1089  bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override;
1090 };
1092  public:
1093  std::string object_id{};
1094  uint32_t key{0};
1095  std::string name{};
1096  std::string unique_id{};
1097  std::string icon{};
1098  bool disabled_by_default{false};
1099  enums::EntityCategory entity_category{};
1100  bool assumed_state{false};
1101  bool supports_open{false};
1102  bool requires_code{false};
1103  std::string code_format{};
1104  void encode(ProtoWriteBuffer buffer) const override;
1105 #ifdef HAS_PROTO_MESSAGE_DUMP
1106  void dump_to(std::string &out) const override;
1107 #endif
1108 
1109  protected:
1110  bool decode_32bit(uint32_t field_id, Proto32Bit value) override;
1111  bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override;
1112  bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
1113 };
1115  public:
1116  uint32_t key{0};
1118  void encode(ProtoWriteBuffer buffer) const override;
1119 #ifdef HAS_PROTO_MESSAGE_DUMP
1120  void dump_to(std::string &out) const override;
1121 #endif
1122 
1123  protected:
1124  bool decode_32bit(uint32_t field_id, Proto32Bit value) override;
1125  bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
1126 };
1128  public:
1129  uint32_t key{0};
1131  bool has_code{false};
1132  std::string code{};
1133  void encode(ProtoWriteBuffer buffer) const override;
1134 #ifdef HAS_PROTO_MESSAGE_DUMP
1135  void dump_to(std::string &out) const override;
1136 #endif
1137 
1138  protected:
1139  bool decode_32bit(uint32_t field_id, Proto32Bit value) override;
1140  bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override;
1141  bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
1142 };
1144  public:
1145  std::string object_id{};
1146  uint32_t key{0};
1147  std::string name{};
1148  std::string unique_id{};
1149  std::string icon{};
1150  bool disabled_by_default{false};
1151  enums::EntityCategory entity_category{};
1152  std::string device_class{};
1153  void encode(ProtoWriteBuffer buffer) const override;
1154 #ifdef HAS_PROTO_MESSAGE_DUMP
1155  void dump_to(std::string &out) const override;
1156 #endif
1157 
1158  protected:
1159  bool decode_32bit(uint32_t field_id, Proto32Bit value) override;
1160  bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override;
1161  bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
1162 };
1164  public:
1165  uint32_t key{0};
1166  void encode(ProtoWriteBuffer buffer) const override;
1167 #ifdef HAS_PROTO_MESSAGE_DUMP
1168  void dump_to(std::string &out) const override;
1169 #endif
1170 
1171  protected:
1172  bool decode_32bit(uint32_t field_id, Proto32Bit value) override;
1173 };
1175  public:
1176  std::string object_id{};
1177  uint32_t key{0};
1178  std::string name{};
1179  std::string unique_id{};
1180  std::string icon{};
1181  bool disabled_by_default{false};
1182  enums::EntityCategory entity_category{};
1183  bool supports_pause{false};
1184  void encode(ProtoWriteBuffer buffer) const override;
1185 #ifdef HAS_PROTO_MESSAGE_DUMP
1186  void dump_to(std::string &out) const override;
1187 #endif
1188 
1189  protected:
1190  bool decode_32bit(uint32_t field_id, Proto32Bit value) override;
1191  bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override;
1192  bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
1193 };
1195  public:
1196  uint32_t key{0};
1198  float volume{0.0f};
1199  bool muted{false};
1200  void encode(ProtoWriteBuffer buffer) const override;
1201 #ifdef HAS_PROTO_MESSAGE_DUMP
1202  void dump_to(std::string &out) const override;
1203 #endif
1204 
1205  protected:
1206  bool decode_32bit(uint32_t field_id, Proto32Bit value) override;
1207  bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
1208 };
1210  public:
1211  uint32_t key{0};
1212  bool has_command{false};
1214  bool has_volume{false};
1215  float volume{0.0f};
1216  bool has_media_url{false};
1217  std::string media_url{};
1218  void encode(ProtoWriteBuffer buffer) const override;
1219 #ifdef HAS_PROTO_MESSAGE_DUMP
1220  void dump_to(std::string &out) const override;
1221 #endif
1222 
1223  protected:
1224  bool decode_32bit(uint32_t field_id, Proto32Bit value) override;
1225  bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override;
1226  bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
1227 };
1229  public:
1230  void encode(ProtoWriteBuffer buffer) const override;
1231 #ifdef HAS_PROTO_MESSAGE_DUMP
1232  void dump_to(std::string &out) const override;
1233 #endif
1234 
1235  protected:
1236 };
1238  public:
1239  std::string uuid{};
1240  std::vector<uint32_t> legacy_data{};
1241  std::string data{};
1242  void encode(ProtoWriteBuffer buffer) const override;
1243 #ifdef HAS_PROTO_MESSAGE_DUMP
1244  void dump_to(std::string &out) const override;
1245 #endif
1246 
1247  protected:
1248  bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override;
1249  bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
1250 };
1252  public:
1253  uint64_t address{0};
1254  std::string name{};
1255  int32_t rssi{0};
1256  std::vector<std::string> service_uuids{};
1257  std::vector<BluetoothServiceData> service_data{};
1258  std::vector<BluetoothServiceData> manufacturer_data{};
1259  void encode(ProtoWriteBuffer buffer) const override;
1260 #ifdef HAS_PROTO_MESSAGE_DUMP
1261  void dump_to(std::string &out) const override;
1262 #endif
1263 
1264  protected:
1265  bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override;
1266  bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
1267 };
1269  public:
1270  uint64_t address{0};
1272  void encode(ProtoWriteBuffer buffer) const override;
1273 #ifdef HAS_PROTO_MESSAGE_DUMP
1274  void dump_to(std::string &out) const override;
1275 #endif
1276 
1277  protected:
1278  bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
1279 };
1281  public:
1282  uint64_t address{0};
1283  bool connected{false};
1284  uint32_t mtu{0};
1285  int32_t error{0};
1286  void encode(ProtoWriteBuffer buffer) const override;
1287 #ifdef HAS_PROTO_MESSAGE_DUMP
1288  void dump_to(std::string &out) const override;
1289 #endif
1290 
1291  protected:
1292  bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
1293 };
1295  public:
1296  uint64_t address{0};
1297  void encode(ProtoWriteBuffer buffer) const override;
1298 #ifdef HAS_PROTO_MESSAGE_DUMP
1299  void dump_to(std::string &out) const override;
1300 #endif
1301 
1302  protected:
1303  bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
1304 };
1306  public:
1307  std::vector<uint64_t> uuid{};
1308  uint32_t handle{0};
1309  void encode(ProtoWriteBuffer buffer) const override;
1310 #ifdef HAS_PROTO_MESSAGE_DUMP
1311  void dump_to(std::string &out) const override;
1312 #endif
1313 
1314  protected:
1315  bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
1316 };
1318  public:
1319  std::vector<uint64_t> uuid{};
1320  uint32_t handle{0};
1321  uint32_t properties{0};
1322  std::vector<BluetoothGATTDescriptor> descriptors{};
1323  void encode(ProtoWriteBuffer buffer) const override;
1324 #ifdef HAS_PROTO_MESSAGE_DUMP
1325  void dump_to(std::string &out) const override;
1326 #endif
1327 
1328  protected:
1329  bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override;
1330  bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
1331 };
1333  public:
1334  std::vector<uint64_t> uuid{};
1335  uint32_t handle{0};
1336  std::vector<BluetoothGATTCharacteristic> characteristics{};
1337  void encode(ProtoWriteBuffer buffer) const override;
1338 #ifdef HAS_PROTO_MESSAGE_DUMP
1339  void dump_to(std::string &out) const override;
1340 #endif
1341 
1342  protected:
1343  bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override;
1344  bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
1345 };
1347  public:
1348  uint64_t address{0};
1349  std::vector<BluetoothGATTService> services{};
1350  void encode(ProtoWriteBuffer buffer) const override;
1351 #ifdef HAS_PROTO_MESSAGE_DUMP
1352  void dump_to(std::string &out) const override;
1353 #endif
1354 
1355  protected:
1356  bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override;
1357  bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
1358 };
1360  public:
1361  uint64_t address{0};
1362  void encode(ProtoWriteBuffer buffer) const override;
1363 #ifdef HAS_PROTO_MESSAGE_DUMP
1364  void dump_to(std::string &out) const override;
1365 #endif
1366 
1367  protected:
1368  bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
1369 };
1371  public:
1372  uint64_t address{0};
1373  uint32_t handle{0};
1374  void encode(ProtoWriteBuffer buffer) const override;
1375 #ifdef HAS_PROTO_MESSAGE_DUMP
1376  void dump_to(std::string &out) const override;
1377 #endif
1378 
1379  protected:
1380  bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
1381 };
1383  public:
1384  uint64_t address{0};
1385  uint32_t handle{0};
1386  std::string data{};
1387  void encode(ProtoWriteBuffer buffer) const override;
1388 #ifdef HAS_PROTO_MESSAGE_DUMP
1389  void dump_to(std::string &out) const override;
1390 #endif
1391 
1392  protected:
1393  bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override;
1394  bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
1395 };
1397  public:
1398  uint64_t address{0};
1399  uint32_t handle{0};
1400  bool response{false};
1401  std::string data{};
1402  void encode(ProtoWriteBuffer buffer) const override;
1403 #ifdef HAS_PROTO_MESSAGE_DUMP
1404  void dump_to(std::string &out) const override;
1405 #endif
1406 
1407  protected:
1408  bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override;
1409  bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
1410 };
1412  public:
1413  uint64_t address{0};
1414  uint32_t handle{0};
1415  void encode(ProtoWriteBuffer buffer) const override;
1416 #ifdef HAS_PROTO_MESSAGE_DUMP
1417  void dump_to(std::string &out) const override;
1418 #endif
1419 
1420  protected:
1421  bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
1422 };
1424  public:
1425  uint64_t address{0};
1426  uint32_t handle{0};
1427  std::string data{};
1428  void encode(ProtoWriteBuffer buffer) const override;
1429 #ifdef HAS_PROTO_MESSAGE_DUMP
1430  void dump_to(std::string &out) const override;
1431 #endif
1432 
1433  protected:
1434  bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override;
1435  bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
1436 };
1438  public:
1439  uint64_t address{0};
1440  uint32_t handle{0};
1441  bool enable{false};
1442  void encode(ProtoWriteBuffer buffer) const override;
1443 #ifdef HAS_PROTO_MESSAGE_DUMP
1444  void dump_to(std::string &out) const override;
1445 #endif
1446 
1447  protected:
1448  bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
1449 };
1451  public:
1452  uint64_t address{0};
1453  uint32_t handle{0};
1454  std::string data{};
1455  void encode(ProtoWriteBuffer buffer) const override;
1456 #ifdef HAS_PROTO_MESSAGE_DUMP
1457  void dump_to(std::string &out) const override;
1458 #endif
1459 
1460  protected:
1461  bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override;
1462  bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
1463 };
1465  public:
1466  void encode(ProtoWriteBuffer buffer) const override;
1467 #ifdef HAS_PROTO_MESSAGE_DUMP
1468  void dump_to(std::string &out) const override;
1469 #endif
1470 
1471  protected:
1472 };
1474  public:
1475  uint32_t free{0};
1476  uint32_t limit{0};
1477  void encode(ProtoWriteBuffer buffer) const override;
1478 #ifdef HAS_PROTO_MESSAGE_DUMP
1479  void dump_to(std::string &out) const override;
1480 #endif
1481 
1482  protected:
1483  bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
1484 };
1486  public:
1487  uint64_t address{0};
1488  uint32_t handle{0};
1489  int32_t error{0};
1490  void encode(ProtoWriteBuffer buffer) const override;
1491 #ifdef HAS_PROTO_MESSAGE_DUMP
1492  void dump_to(std::string &out) const override;
1493 #endif
1494 
1495  protected:
1496  bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
1497 };
1499  public:
1500  uint64_t address{0};
1501  uint32_t handle{0};
1502  void encode(ProtoWriteBuffer buffer) const override;
1503 #ifdef HAS_PROTO_MESSAGE_DUMP
1504  void dump_to(std::string &out) const override;
1505 #endif
1506 
1507  protected:
1508  bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
1509 };
1511  public:
1512  uint64_t address{0};
1513  uint32_t handle{0};
1514  void encode(ProtoWriteBuffer buffer) const override;
1515 #ifdef HAS_PROTO_MESSAGE_DUMP
1516  void dump_to(std::string &out) const override;
1517 #endif
1518 
1519  protected:
1520  bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
1521 };
1522 
1523 } // namespace api
1524 } // namespace esphome
float target_temperature_low
Definition: climate.h:552
const char * name
Definition: stm32flash.h:78
Representation of a VarInt - in ProtoBuf should be 64bit but we only use 32bit.
Definition: proto.h:15
int speed
Definition: fan.h:35
float tilt
Definition: cover.h:15
float target_temperature_high
Definition: climate.h:553
ClimateSwingMode swing_mode
Definition: climate.h:548
FanDirection direction
Definition: fan.h:37
uint8_t custom_preset
Definition: climate.h:546
BedjetMode mode
BedJet operating mode.
Definition: bedjet_codec.h:151
uint8_t type
uint8_t options
ClimateFanMode fan_mode
Definition: climate.h:540
bool oscillating
Definition: fan.h:36
Definition: a4988.cpp:4
float position
Definition: cover.h:14
uint8_t custom_fan_mode
Definition: climate.h:541
float target_temperature
Definition: climate.h:550
ClimatePreset preset
Definition: climate.h:545
bool state
Definition: fan.h:34