ESPHome  2022.8.0
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 
159 } // namespace enums
160 
161 class HelloRequest : public ProtoMessage {
162  public:
163  std::string client_info{};
164  void encode(ProtoWriteBuffer buffer) const override;
165 #ifdef HAS_PROTO_MESSAGE_DUMP
166  void dump_to(std::string &out) const override;
167 #endif
168 
169  protected:
170  bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override;
171 };
172 class HelloResponse : public ProtoMessage {
173  public:
174  uint32_t api_version_major{0};
175  uint32_t api_version_minor{0};
176  std::string server_info{};
177  std::string name{};
178  void encode(ProtoWriteBuffer buffer) const override;
179 #ifdef HAS_PROTO_MESSAGE_DUMP
180  void dump_to(std::string &out) const override;
181 #endif
182 
183  protected:
184  bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override;
185  bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
186 };
187 class ConnectRequest : public ProtoMessage {
188  public:
189  std::string password{};
190  void encode(ProtoWriteBuffer buffer) const override;
191 #ifdef HAS_PROTO_MESSAGE_DUMP
192  void dump_to(std::string &out) const override;
193 #endif
194 
195  protected:
196  bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override;
197 };
199  public:
200  bool invalid_password{false};
201  void encode(ProtoWriteBuffer buffer) const override;
202 #ifdef HAS_PROTO_MESSAGE_DUMP
203  void dump_to(std::string &out) const override;
204 #endif
205 
206  protected:
207  bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
208 };
210  public:
211  void encode(ProtoWriteBuffer buffer) const override;
212 #ifdef HAS_PROTO_MESSAGE_DUMP
213  void dump_to(std::string &out) const override;
214 #endif
215 
216  protected:
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 };
227 class PingRequest : public ProtoMessage {
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 PingResponse : 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 };
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  bool uses_password{false};
257  std::string name{};
258  std::string mac_address{};
259  std::string esphome_version{};
260  std::string compilation_time{};
261  std::string model{};
262  bool has_deep_sleep{false};
263  std::string project_name{};
264  std::string project_version{};
265  uint32_t webserver_port{0};
266  void encode(ProtoWriteBuffer buffer) const override;
267 #ifdef HAS_PROTO_MESSAGE_DUMP
268  void dump_to(std::string &out) const override;
269 #endif
270 
271  protected:
272  bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override;
273  bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
274 };
276  public:
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 };
285  public:
286  void encode(ProtoWriteBuffer buffer) const override;
287 #ifdef HAS_PROTO_MESSAGE_DUMP
288  void dump_to(std::string &out) const override;
289 #endif
290 
291  protected:
292 };
294  public:
295  void encode(ProtoWriteBuffer buffer) const override;
296 #ifdef HAS_PROTO_MESSAGE_DUMP
297  void dump_to(std::string &out) const override;
298 #endif
299 
300  protected:
301 };
303  public:
304  std::string object_id{};
305  uint32_t key{0};
306  std::string name{};
307  std::string unique_id{};
308  std::string device_class{};
309  bool is_status_binary_sensor{false};
310  bool disabled_by_default{false};
311  std::string icon{};
312  enums::EntityCategory entity_category{};
313  void encode(ProtoWriteBuffer buffer) const override;
314 #ifdef HAS_PROTO_MESSAGE_DUMP
315  void dump_to(std::string &out) const override;
316 #endif
317 
318  protected:
319  bool decode_32bit(uint32_t field_id, Proto32Bit value) override;
320  bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override;
321  bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
322 };
324  public:
325  uint32_t key{0};
326  bool state{false};
327  bool missing_state{false};
328  void encode(ProtoWriteBuffer buffer) const override;
329 #ifdef HAS_PROTO_MESSAGE_DUMP
330  void dump_to(std::string &out) const override;
331 #endif
332 
333  protected:
334  bool decode_32bit(uint32_t field_id, Proto32Bit value) override;
335  bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
336 };
338  public:
339  std::string object_id{};
340  uint32_t key{0};
341  std::string name{};
342  std::string unique_id{};
343  bool assumed_state{false};
344  bool supports_position{false};
345  bool supports_tilt{false};
346  std::string device_class{};
347  bool disabled_by_default{false};
348  std::string icon{};
349  enums::EntityCategory entity_category{};
350  void encode(ProtoWriteBuffer buffer) const override;
351 #ifdef HAS_PROTO_MESSAGE_DUMP
352  void dump_to(std::string &out) const override;
353 #endif
354 
355  protected:
356  bool decode_32bit(uint32_t field_id, Proto32Bit value) override;
357  bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override;
358  bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
359 };
361  public:
362  uint32_t key{0};
363  enums::LegacyCoverState legacy_state{};
364  float position{0.0f};
365  float tilt{0.0f};
366  enums::CoverOperation current_operation{};
367  void encode(ProtoWriteBuffer buffer) const override;
368 #ifdef HAS_PROTO_MESSAGE_DUMP
369  void dump_to(std::string &out) const override;
370 #endif
371 
372  protected:
373  bool decode_32bit(uint32_t field_id, Proto32Bit value) override;
374  bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
375 };
377  public:
378  uint32_t key{0};
379  bool has_legacy_command{false};
380  enums::LegacyCoverCommand legacy_command{};
381  bool has_position{false};
382  float position{0.0f};
383  bool has_tilt{false};
384  float tilt{0.0f};
385  bool stop{false};
386  void encode(ProtoWriteBuffer buffer) const override;
387 #ifdef HAS_PROTO_MESSAGE_DUMP
388  void dump_to(std::string &out) const override;
389 #endif
390 
391  protected:
392  bool decode_32bit(uint32_t field_id, Proto32Bit value) override;
393  bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
394 };
396  public:
397  std::string object_id{};
398  uint32_t key{0};
399  std::string name{};
400  std::string unique_id{};
401  bool supports_oscillation{false};
402  bool supports_speed{false};
403  bool supports_direction{false};
404  int32_t supported_speed_count{0};
405  bool disabled_by_default{false};
406  std::string icon{};
407  enums::EntityCategory entity_category{};
408  void encode(ProtoWriteBuffer buffer) const override;
409 #ifdef HAS_PROTO_MESSAGE_DUMP
410  void dump_to(std::string &out) const override;
411 #endif
412 
413  protected:
414  bool decode_32bit(uint32_t field_id, Proto32Bit value) override;
415  bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override;
416  bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
417 };
419  public:
420  uint32_t key{0};
421  bool state{false};
422  bool oscillating{false};
425  int32_t speed_level{0};
426  void encode(ProtoWriteBuffer buffer) const override;
427 #ifdef HAS_PROTO_MESSAGE_DUMP
428  void dump_to(std::string &out) const override;
429 #endif
430 
431  protected:
432  bool decode_32bit(uint32_t field_id, Proto32Bit value) override;
433  bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
434 };
436  public:
437  uint32_t key{0};
438  bool has_state{false};
439  bool state{false};
440  bool has_speed{false};
442  bool has_oscillating{false};
443  bool oscillating{false};
444  bool has_direction{false};
446  bool has_speed_level{false};
447  int32_t speed_level{0};
448  void encode(ProtoWriteBuffer buffer) const override;
449 #ifdef HAS_PROTO_MESSAGE_DUMP
450  void dump_to(std::string &out) const override;
451 #endif
452 
453  protected:
454  bool decode_32bit(uint32_t field_id, Proto32Bit value) override;
455  bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
456 };
458  public:
459  std::string object_id{};
460  uint32_t key{0};
461  std::string name{};
462  std::string unique_id{};
463  std::vector<enums::ColorMode> supported_color_modes{};
464  bool legacy_supports_brightness{false};
465  bool legacy_supports_rgb{false};
466  bool legacy_supports_white_value{false};
467  bool legacy_supports_color_temperature{false};
468  float min_mireds{0.0f};
469  float max_mireds{0.0f};
470  std::vector<std::string> effects{};
471  bool disabled_by_default{false};
472  std::string icon{};
473  enums::EntityCategory entity_category{};
474  void encode(ProtoWriteBuffer buffer) const override;
475 #ifdef HAS_PROTO_MESSAGE_DUMP
476  void dump_to(std::string &out) const override;
477 #endif
478 
479  protected:
480  bool decode_32bit(uint32_t field_id, Proto32Bit value) override;
481  bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override;
482  bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
483 };
485  public:
486  uint32_t key{0};
487  bool state{false};
488  float brightness{0.0f};
489  enums::ColorMode color_mode{};
490  float color_brightness{0.0f};
491  float red{0.0f};
492  float green{0.0f};
493  float blue{0.0f};
494  float white{0.0f};
495  float color_temperature{0.0f};
496  float cold_white{0.0f};
497  float warm_white{0.0f};
498  std::string effect{};
499  void encode(ProtoWriteBuffer buffer) const override;
500 #ifdef HAS_PROTO_MESSAGE_DUMP
501  void dump_to(std::string &out) const override;
502 #endif
503 
504  protected:
505  bool decode_32bit(uint32_t field_id, Proto32Bit value) override;
506  bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override;
507  bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
508 };
510  public:
511  uint32_t key{0};
512  bool has_state{false};
513  bool state{false};
514  bool has_brightness{false};
515  float brightness{0.0f};
516  bool has_color_mode{false};
517  enums::ColorMode color_mode{};
518  bool has_color_brightness{false};
519  float color_brightness{0.0f};
520  bool has_rgb{false};
521  float red{0.0f};
522  float green{0.0f};
523  float blue{0.0f};
524  bool has_white{false};
525  float white{0.0f};
526  bool has_color_temperature{false};
527  float color_temperature{0.0f};
528  bool has_cold_white{false};
529  float cold_white{0.0f};
530  bool has_warm_white{false};
531  float warm_white{0.0f};
532  bool has_transition_length{false};
533  uint32_t transition_length{0};
534  bool has_flash_length{false};
535  uint32_t flash_length{0};
536  bool has_effect{false};
537  std::string effect{};
538  void encode(ProtoWriteBuffer buffer) const override;
539 #ifdef HAS_PROTO_MESSAGE_DUMP
540  void dump_to(std::string &out) const override;
541 #endif
542 
543  protected:
544  bool decode_32bit(uint32_t field_id, Proto32Bit value) override;
545  bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override;
546  bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
547 };
549  public:
550  std::string object_id{};
551  uint32_t key{0};
552  std::string name{};
553  std::string unique_id{};
554  std::string icon{};
555  std::string unit_of_measurement{};
556  int32_t accuracy_decimals{0};
557  bool force_update{false};
558  std::string device_class{};
559  enums::SensorStateClass state_class{};
560  enums::SensorLastResetType legacy_last_reset_type{};
561  bool disabled_by_default{false};
562  enums::EntityCategory entity_category{};
563  void encode(ProtoWriteBuffer buffer) const override;
564 #ifdef HAS_PROTO_MESSAGE_DUMP
565  void dump_to(std::string &out) const override;
566 #endif
567 
568  protected:
569  bool decode_32bit(uint32_t field_id, Proto32Bit value) override;
570  bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override;
571  bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
572 };
574  public:
575  uint32_t key{0};
576  float state{0.0f};
577  bool missing_state{false};
578  void encode(ProtoWriteBuffer buffer) const override;
579 #ifdef HAS_PROTO_MESSAGE_DUMP
580  void dump_to(std::string &out) const override;
581 #endif
582 
583  protected:
584  bool decode_32bit(uint32_t field_id, Proto32Bit value) override;
585  bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
586 };
588  public:
589  std::string object_id{};
590  uint32_t key{0};
591  std::string name{};
592  std::string unique_id{};
593  std::string icon{};
594  bool assumed_state{false};
595  bool disabled_by_default{false};
596  enums::EntityCategory entity_category{};
597  std::string device_class{};
598  void encode(ProtoWriteBuffer buffer) const override;
599 #ifdef HAS_PROTO_MESSAGE_DUMP
600  void dump_to(std::string &out) const override;
601 #endif
602 
603  protected:
604  bool decode_32bit(uint32_t field_id, Proto32Bit value) override;
605  bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override;
606  bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
607 };
609  public:
610  uint32_t key{0};
611  bool state{false};
612  void encode(ProtoWriteBuffer buffer) const override;
613 #ifdef HAS_PROTO_MESSAGE_DUMP
614  void dump_to(std::string &out) const override;
615 #endif
616 
617  protected:
618  bool decode_32bit(uint32_t field_id, Proto32Bit value) override;
619  bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
620 };
622  public:
623  uint32_t key{0};
624  bool state{false};
625  void encode(ProtoWriteBuffer buffer) const override;
626 #ifdef HAS_PROTO_MESSAGE_DUMP
627  void dump_to(std::string &out) const override;
628 #endif
629 
630  protected:
631  bool decode_32bit(uint32_t field_id, Proto32Bit value) override;
632  bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
633 };
635  public:
636  std::string object_id{};
637  uint32_t key{0};
638  std::string name{};
639  std::string unique_id{};
640  std::string icon{};
641  bool disabled_by_default{false};
642  enums::EntityCategory entity_category{};
643  void encode(ProtoWriteBuffer buffer) const override;
644 #ifdef HAS_PROTO_MESSAGE_DUMP
645  void dump_to(std::string &out) const override;
646 #endif
647 
648  protected:
649  bool decode_32bit(uint32_t field_id, Proto32Bit value) override;
650  bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override;
651  bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
652 };
654  public:
655  uint32_t key{0};
656  std::string state{};
657  bool missing_state{false};
658  void encode(ProtoWriteBuffer buffer) const override;
659 #ifdef HAS_PROTO_MESSAGE_DUMP
660  void dump_to(std::string &out) const override;
661 #endif
662 
663  protected:
664  bool decode_32bit(uint32_t field_id, Proto32Bit value) override;
665  bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override;
666  bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
667 };
669  public:
671  bool dump_config{false};
672  void encode(ProtoWriteBuffer buffer) const override;
673 #ifdef HAS_PROTO_MESSAGE_DUMP
674  void dump_to(std::string &out) const override;
675 #endif
676 
677  protected:
678  bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
679 };
681  public:
683  std::string message{};
684  bool send_failed{false};
685  void encode(ProtoWriteBuffer buffer) const override;
686 #ifdef HAS_PROTO_MESSAGE_DUMP
687  void dump_to(std::string &out) const override;
688 #endif
689 
690  protected:
691  bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override;
692  bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
693 };
695  public:
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 };
704  public:
705  std::string key{};
706  std::string value{};
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  bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override;
714 };
716  public:
717  std::string service{};
718  std::vector<HomeassistantServiceMap> data{};
719  std::vector<HomeassistantServiceMap> data_template{};
720  std::vector<HomeassistantServiceMap> variables{};
721  bool is_event{false};
722  void encode(ProtoWriteBuffer buffer) const override;
723 #ifdef HAS_PROTO_MESSAGE_DUMP
724  void dump_to(std::string &out) const override;
725 #endif
726 
727  protected:
728  bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override;
729  bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
730 };
732  public:
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 };
741  public:
742  std::string entity_id{};
743  std::string attribute{};
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  bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override;
751 };
753  public:
754  std::string entity_id{};
755  std::string state{};
756  std::string attribute{};
757  void encode(ProtoWriteBuffer buffer) const override;
758 #ifdef HAS_PROTO_MESSAGE_DUMP
759  void dump_to(std::string &out) const override;
760 #endif
761 
762  protected:
763  bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override;
764 };
765 class GetTimeRequest : public ProtoMessage {
766  public:
767  void encode(ProtoWriteBuffer buffer) const override;
768 #ifdef HAS_PROTO_MESSAGE_DUMP
769  void dump_to(std::string &out) const override;
770 #endif
771 
772  protected:
773 };
775  public:
776  uint32_t epoch_seconds{0};
777  void encode(ProtoWriteBuffer buffer) const override;
778 #ifdef HAS_PROTO_MESSAGE_DUMP
779  void dump_to(std::string &out) const override;
780 #endif
781 
782  protected:
783  bool decode_32bit(uint32_t field_id, Proto32Bit value) override;
784 };
786  public:
787  std::string name{};
789  void encode(ProtoWriteBuffer buffer) const override;
790 #ifdef HAS_PROTO_MESSAGE_DUMP
791  void dump_to(std::string &out) const override;
792 #endif
793 
794  protected:
795  bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override;
796  bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
797 };
799  public:
800  std::string name{};
801  uint32_t key{0};
802  std::vector<ListEntitiesServicesArgument> args{};
803  void encode(ProtoWriteBuffer buffer) const override;
804 #ifdef HAS_PROTO_MESSAGE_DUMP
805  void dump_to(std::string &out) const override;
806 #endif
807 
808  protected:
809  bool decode_32bit(uint32_t field_id, Proto32Bit value) override;
810  bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override;
811 };
813  public:
814  bool bool_{false};
815  int32_t legacy_int{0};
816  float float_{0.0f};
817  std::string string_{};
818  int32_t int_{0};
819  std::vector<bool> bool_array{};
820  std::vector<int32_t> int_array{};
821  std::vector<float> float_array{};
822  std::vector<std::string> string_array{};
823  void encode(ProtoWriteBuffer buffer) const override;
824 #ifdef HAS_PROTO_MESSAGE_DUMP
825  void dump_to(std::string &out) const override;
826 #endif
827 
828  protected:
829  bool decode_32bit(uint32_t field_id, Proto32Bit value) override;
830  bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override;
831  bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
832 };
834  public:
835  uint32_t key{0};
836  std::vector<ExecuteServiceArgument> args{};
837  void encode(ProtoWriteBuffer buffer) const override;
838 #ifdef HAS_PROTO_MESSAGE_DUMP
839  void dump_to(std::string &out) const override;
840 #endif
841 
842  protected:
843  bool decode_32bit(uint32_t field_id, Proto32Bit value) override;
844  bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override;
845 };
847  public:
848  std::string object_id{};
849  uint32_t key{0};
850  std::string name{};
851  std::string unique_id{};
852  bool disabled_by_default{false};
853  std::string icon{};
854  enums::EntityCategory entity_category{};
855  void encode(ProtoWriteBuffer buffer) const override;
856 #ifdef HAS_PROTO_MESSAGE_DUMP
857  void dump_to(std::string &out) const override;
858 #endif
859 
860  protected:
861  bool decode_32bit(uint32_t field_id, Proto32Bit value) override;
862  bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override;
863  bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
864 };
866  public:
867  uint32_t key{0};
868  std::string data{};
869  bool done{false};
870  void encode(ProtoWriteBuffer buffer) const override;
871 #ifdef HAS_PROTO_MESSAGE_DUMP
872  void dump_to(std::string &out) const override;
873 #endif
874 
875  protected:
876  bool decode_32bit(uint32_t field_id, Proto32Bit value) override;
877  bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override;
878  bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
879 };
881  public:
882  bool single{false};
883  bool stream{false};
884  void encode(ProtoWriteBuffer buffer) const override;
885 #ifdef HAS_PROTO_MESSAGE_DUMP
886  void dump_to(std::string &out) const override;
887 #endif
888 
889  protected:
890  bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
891 };
893  public:
894  std::string object_id{};
895  uint32_t key{0};
896  std::string name{};
897  std::string unique_id{};
898  bool supports_current_temperature{false};
899  bool supports_two_point_target_temperature{false};
900  std::vector<enums::ClimateMode> supported_modes{};
901  float visual_min_temperature{0.0f};
902  float visual_max_temperature{0.0f};
903  float visual_temperature_step{0.0f};
904  bool legacy_supports_away{false};
905  bool supports_action{false};
906  std::vector<enums::ClimateFanMode> supported_fan_modes{};
907  std::vector<enums::ClimateSwingMode> supported_swing_modes{};
908  std::vector<std::string> supported_custom_fan_modes{};
909  std::vector<enums::ClimatePreset> supported_presets{};
910  std::vector<std::string> supported_custom_presets{};
911  bool disabled_by_default{false};
912  std::string icon{};
913  enums::EntityCategory entity_category{};
914  void encode(ProtoWriteBuffer buffer) const override;
915 #ifdef HAS_PROTO_MESSAGE_DUMP
916  void dump_to(std::string &out) const override;
917 #endif
918 
919  protected:
920  bool decode_32bit(uint32_t field_id, Proto32Bit value) override;
921  bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override;
922  bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
923 };
925  public:
926  uint32_t key{0};
928  float current_temperature{0.0f};
929  float target_temperature{0.0f};
932  bool legacy_away{false};
936  std::string custom_fan_mode{};
938  std::string custom_preset{};
939  void encode(ProtoWriteBuffer buffer) const override;
940 #ifdef HAS_PROTO_MESSAGE_DUMP
941  void dump_to(std::string &out) const override;
942 #endif
943 
944  protected:
945  bool decode_32bit(uint32_t field_id, Proto32Bit value) override;
946  bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override;
947  bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
948 };
950  public:
951  uint32_t key{0};
952  bool has_mode{false};
954  bool has_target_temperature{false};
955  float target_temperature{0.0f};
956  bool has_target_temperature_low{false};
958  bool has_target_temperature_high{false};
960  bool has_legacy_away{false};
961  bool legacy_away{false};
962  bool has_fan_mode{false};
964  bool has_swing_mode{false};
966  bool has_custom_fan_mode{false};
967  std::string custom_fan_mode{};
968  bool has_preset{false};
970  bool has_custom_preset{false};
971  std::string custom_preset{};
972  void encode(ProtoWriteBuffer buffer) const override;
973 #ifdef HAS_PROTO_MESSAGE_DUMP
974  void dump_to(std::string &out) const override;
975 #endif
976 
977  protected:
978  bool decode_32bit(uint32_t field_id, Proto32Bit value) override;
979  bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override;
980  bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
981 };
983  public:
984  std::string object_id{};
985  uint32_t key{0};
986  std::string name{};
987  std::string unique_id{};
988  std::string icon{};
989  float min_value{0.0f};
990  float max_value{0.0f};
991  float step{0.0f};
992  bool disabled_by_default{false};
993  enums::EntityCategory entity_category{};
994  std::string unit_of_measurement{};
996  void encode(ProtoWriteBuffer buffer) const override;
997 #ifdef HAS_PROTO_MESSAGE_DUMP
998  void dump_to(std::string &out) const override;
999 #endif
1000 
1001  protected:
1002  bool decode_32bit(uint32_t field_id, Proto32Bit value) override;
1003  bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override;
1004  bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
1005 };
1007  public:
1008  uint32_t key{0};
1009  float state{0.0f};
1010  bool missing_state{false};
1011  void encode(ProtoWriteBuffer buffer) const override;
1012 #ifdef HAS_PROTO_MESSAGE_DUMP
1013  void dump_to(std::string &out) const override;
1014 #endif
1015 
1016  protected:
1017  bool decode_32bit(uint32_t field_id, Proto32Bit value) override;
1018  bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
1019 };
1021  public:
1022  uint32_t key{0};
1023  float state{0.0f};
1024  void encode(ProtoWriteBuffer buffer) const override;
1025 #ifdef HAS_PROTO_MESSAGE_DUMP
1026  void dump_to(std::string &out) const override;
1027 #endif
1028 
1029  protected:
1030  bool decode_32bit(uint32_t field_id, Proto32Bit value) override;
1031 };
1033  public:
1034  std::string object_id{};
1035  uint32_t key{0};
1036  std::string name{};
1037  std::string unique_id{};
1038  std::string icon{};
1039  std::vector<std::string> options{};
1040  bool disabled_by_default{false};
1041  enums::EntityCategory entity_category{};
1042  void encode(ProtoWriteBuffer buffer) const override;
1043 #ifdef HAS_PROTO_MESSAGE_DUMP
1044  void dump_to(std::string &out) const override;
1045 #endif
1046 
1047  protected:
1048  bool decode_32bit(uint32_t field_id, Proto32Bit value) override;
1049  bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override;
1050  bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
1051 };
1053  public:
1054  uint32_t key{0};
1055  std::string state{};
1056  bool missing_state{false};
1057  void encode(ProtoWriteBuffer buffer) const override;
1058 #ifdef HAS_PROTO_MESSAGE_DUMP
1059  void dump_to(std::string &out) const override;
1060 #endif
1061 
1062  protected:
1063  bool decode_32bit(uint32_t field_id, Proto32Bit value) override;
1064  bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override;
1065  bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
1066 };
1068  public:
1069  uint32_t key{0};
1070  std::string state{};
1071  void encode(ProtoWriteBuffer buffer) const override;
1072 #ifdef HAS_PROTO_MESSAGE_DUMP
1073  void dump_to(std::string &out) const override;
1074 #endif
1075 
1076  protected:
1077  bool decode_32bit(uint32_t field_id, Proto32Bit value) override;
1078  bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override;
1079 };
1081  public:
1082  std::string object_id{};
1083  uint32_t key{0};
1084  std::string name{};
1085  std::string unique_id{};
1086  std::string icon{};
1087  bool disabled_by_default{false};
1088  enums::EntityCategory entity_category{};
1089  bool assumed_state{false};
1090  bool supports_open{false};
1091  bool requires_code{false};
1092  std::string code_format{};
1093  void encode(ProtoWriteBuffer buffer) const override;
1094 #ifdef HAS_PROTO_MESSAGE_DUMP
1095  void dump_to(std::string &out) const override;
1096 #endif
1097 
1098  protected:
1099  bool decode_32bit(uint32_t field_id, Proto32Bit value) override;
1100  bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override;
1101  bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
1102 };
1104  public:
1105  uint32_t key{0};
1107  void encode(ProtoWriteBuffer buffer) const override;
1108 #ifdef HAS_PROTO_MESSAGE_DUMP
1109  void dump_to(std::string &out) const override;
1110 #endif
1111 
1112  protected:
1113  bool decode_32bit(uint32_t field_id, Proto32Bit value) override;
1114  bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
1115 };
1117  public:
1118  uint32_t key{0};
1120  bool has_code{false};
1121  std::string code{};
1122  void encode(ProtoWriteBuffer buffer) const override;
1123 #ifdef HAS_PROTO_MESSAGE_DUMP
1124  void dump_to(std::string &out) const override;
1125 #endif
1126 
1127  protected:
1128  bool decode_32bit(uint32_t field_id, Proto32Bit value) override;
1129  bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override;
1130  bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
1131 };
1133  public:
1134  std::string object_id{};
1135  uint32_t key{0};
1136  std::string name{};
1137  std::string unique_id{};
1138  std::string icon{};
1139  bool disabled_by_default{false};
1140  enums::EntityCategory entity_category{};
1141  std::string device_class{};
1142  void encode(ProtoWriteBuffer buffer) const override;
1143 #ifdef HAS_PROTO_MESSAGE_DUMP
1144  void dump_to(std::string &out) const override;
1145 #endif
1146 
1147  protected:
1148  bool decode_32bit(uint32_t field_id, Proto32Bit value) override;
1149  bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override;
1150  bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
1151 };
1153  public:
1154  uint32_t key{0};
1155  void encode(ProtoWriteBuffer buffer) const override;
1156 #ifdef HAS_PROTO_MESSAGE_DUMP
1157  void dump_to(std::string &out) const override;
1158 #endif
1159 
1160  protected:
1161  bool decode_32bit(uint32_t field_id, Proto32Bit value) override;
1162 };
1164  public:
1165  std::string object_id{};
1166  uint32_t key{0};
1167  std::string name{};
1168  std::string unique_id{};
1169  std::string icon{};
1170  bool disabled_by_default{false};
1171  enums::EntityCategory entity_category{};
1172  bool supports_pause{false};
1173  void encode(ProtoWriteBuffer buffer) const override;
1174 #ifdef HAS_PROTO_MESSAGE_DUMP
1175  void dump_to(std::string &out) const override;
1176 #endif
1177 
1178  protected:
1179  bool decode_32bit(uint32_t field_id, Proto32Bit value) override;
1180  bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override;
1181  bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
1182 };
1184  public:
1185  uint32_t key{0};
1187  float volume{0.0f};
1188  bool muted{false};
1189  void encode(ProtoWriteBuffer buffer) const override;
1190 #ifdef HAS_PROTO_MESSAGE_DUMP
1191  void dump_to(std::string &out) const override;
1192 #endif
1193 
1194  protected:
1195  bool decode_32bit(uint32_t field_id, Proto32Bit value) override;
1196  bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
1197 };
1199  public:
1200  uint32_t key{0};
1201  bool has_command{false};
1203  bool has_volume{false};
1204  float volume{0.0f};
1205  bool has_media_url{false};
1206  std::string media_url{};
1207  void encode(ProtoWriteBuffer buffer) const override;
1208 #ifdef HAS_PROTO_MESSAGE_DUMP
1209  void dump_to(std::string &out) const override;
1210 #endif
1211 
1212  protected:
1213  bool decode_32bit(uint32_t field_id, Proto32Bit value) override;
1214  bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override;
1215  bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
1216 };
1217 
1218 } // namespace api
1219 } // 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