ESPHome  2021.11.4
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 {
56 };
57 enum SensorLastResetType : uint32_t {
61 };
62 enum LogLevel : uint32_t {
71 };
72 enum ServiceArgType : uint32_t {
81 };
82 enum ClimateMode : uint32_t {
90 };
91 enum ClimateFanMode : uint32_t {
101 };
102 enum ClimateSwingMode : uint32_t {
107 };
108 enum ClimateAction : uint32_t {
115 };
116 enum ClimatePreset : uint32_t {
125 };
126 
127 } // namespace enums
128 
129 class HelloRequest : public ProtoMessage {
130  public:
131  std::string client_info{};
132  void encode(ProtoWriteBuffer buffer) const override;
133 #ifdef HAS_PROTO_MESSAGE_DUMP
134  void dump_to(std::string &out) const override;
135 #endif
136 
137  protected:
138  bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override;
139 };
140 class HelloResponse : public ProtoMessage {
141  public:
142  uint32_t api_version_major{0};
143  uint32_t api_version_minor{0};
144  std::string server_info{};
145  void encode(ProtoWriteBuffer buffer) const override;
146 #ifdef HAS_PROTO_MESSAGE_DUMP
147  void dump_to(std::string &out) const override;
148 #endif
149 
150  protected:
151  bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override;
152  bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
153 };
154 class ConnectRequest : public ProtoMessage {
155  public:
156  std::string password{};
157  void encode(ProtoWriteBuffer buffer) const override;
158 #ifdef HAS_PROTO_MESSAGE_DUMP
159  void dump_to(std::string &out) const override;
160 #endif
161 
162  protected:
163  bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override;
164 };
166  public:
167  bool invalid_password{false};
168  void encode(ProtoWriteBuffer buffer) const override;
169 #ifdef HAS_PROTO_MESSAGE_DUMP
170  void dump_to(std::string &out) const override;
171 #endif
172 
173  protected:
174  bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
175 };
177  public:
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 };
186  public:
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 };
194 class PingRequest : public ProtoMessage {
195  public:
196  void encode(ProtoWriteBuffer buffer) const override;
197 #ifdef HAS_PROTO_MESSAGE_DUMP
198  void dump_to(std::string &out) const override;
199 #endif
200 
201  protected:
202 };
203 class PingResponse : public ProtoMessage {
204  public:
205  void encode(ProtoWriteBuffer buffer) const override;
206 #ifdef HAS_PROTO_MESSAGE_DUMP
207  void dump_to(std::string &out) const override;
208 #endif
209 
210  protected:
211 };
213  public:
214  void encode(ProtoWriteBuffer buffer) const override;
215 #ifdef HAS_PROTO_MESSAGE_DUMP
216  void dump_to(std::string &out) const override;
217 #endif
218 
219  protected:
220 };
222  public:
223  bool uses_password{false};
224  std::string name{};
225  std::string mac_address{};
226  std::string esphome_version{};
227  std::string compilation_time{};
228  std::string model{};
229  bool has_deep_sleep{false};
230  std::string project_name{};
231  std::string project_version{};
232  uint32_t webserver_port{0};
233  void encode(ProtoWriteBuffer buffer) const override;
234 #ifdef HAS_PROTO_MESSAGE_DUMP
235  void dump_to(std::string &out) const override;
236 #endif
237 
238  protected:
239  bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override;
240  bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
241 };
243  public:
244  void encode(ProtoWriteBuffer buffer) const override;
245 #ifdef HAS_PROTO_MESSAGE_DUMP
246  void dump_to(std::string &out) const override;
247 #endif
248 
249  protected:
250 };
252  public:
253  void encode(ProtoWriteBuffer buffer) const override;
254 #ifdef HAS_PROTO_MESSAGE_DUMP
255  void dump_to(std::string &out) const override;
256 #endif
257 
258  protected:
259 };
261  public:
262  void encode(ProtoWriteBuffer buffer) const override;
263 #ifdef HAS_PROTO_MESSAGE_DUMP
264  void dump_to(std::string &out) const override;
265 #endif
266 
267  protected:
268 };
270  public:
271  std::string object_id{};
272  uint32_t key{0};
273  std::string name{};
274  std::string unique_id{};
275  std::string device_class{};
276  bool is_status_binary_sensor{false};
277  bool disabled_by_default{false};
278  std::string icon{};
279  enums::EntityCategory entity_category{};
280  void encode(ProtoWriteBuffer buffer) const override;
281 #ifdef HAS_PROTO_MESSAGE_DUMP
282  void dump_to(std::string &out) const override;
283 #endif
284 
285  protected:
286  bool decode_32bit(uint32_t field_id, Proto32Bit value) override;
287  bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override;
288  bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
289 };
291  public:
292  uint32_t key{0};
293  bool state{false};
294  bool missing_state{false};
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  bool decode_32bit(uint32_t field_id, Proto32Bit value) override;
302  bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
303 };
305  public:
306  std::string object_id{};
307  uint32_t key{0};
308  std::string name{};
309  std::string unique_id{};
310  bool assumed_state{false};
311  bool supports_position{false};
312  bool supports_tilt{false};
313  std::string device_class{};
314  bool disabled_by_default{false};
315  std::string icon{};
316  enums::EntityCategory entity_category{};
317  void encode(ProtoWriteBuffer buffer) const override;
318 #ifdef HAS_PROTO_MESSAGE_DUMP
319  void dump_to(std::string &out) const override;
320 #endif
321 
322  protected:
323  bool decode_32bit(uint32_t field_id, Proto32Bit value) override;
324  bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override;
325  bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
326 };
328  public:
329  uint32_t key{0};
330  enums::LegacyCoverState legacy_state{};
331  float position{0.0f};
332  float tilt{0.0f};
333  enums::CoverOperation current_operation{};
334  void encode(ProtoWriteBuffer buffer) const override;
335 #ifdef HAS_PROTO_MESSAGE_DUMP
336  void dump_to(std::string &out) const override;
337 #endif
338 
339  protected:
340  bool decode_32bit(uint32_t field_id, Proto32Bit value) override;
341  bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
342 };
344  public:
345  uint32_t key{0};
346  bool has_legacy_command{false};
347  enums::LegacyCoverCommand legacy_command{};
348  bool has_position{false};
349  float position{0.0f};
350  bool has_tilt{false};
351  float tilt{0.0f};
352  bool stop{false};
353  void encode(ProtoWriteBuffer buffer) const override;
354 #ifdef HAS_PROTO_MESSAGE_DUMP
355  void dump_to(std::string &out) const override;
356 #endif
357 
358  protected:
359  bool decode_32bit(uint32_t field_id, Proto32Bit value) override;
360  bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
361 };
363  public:
364  std::string object_id{};
365  uint32_t key{0};
366  std::string name{};
367  std::string unique_id{};
368  bool supports_oscillation{false};
369  bool supports_speed{false};
370  bool supports_direction{false};
371  int32_t supported_speed_count{0};
372  bool disabled_by_default{false};
373  std::string icon{};
374  enums::EntityCategory entity_category{};
375  void encode(ProtoWriteBuffer buffer) const override;
376 #ifdef HAS_PROTO_MESSAGE_DUMP
377  void dump_to(std::string &out) const override;
378 #endif
379 
380  protected:
381  bool decode_32bit(uint32_t field_id, Proto32Bit value) override;
382  bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override;
383  bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
384 };
386  public:
387  uint32_t key{0};
388  bool state{false};
389  bool oscillating{false};
391  enums::FanDirection direction{};
392  int32_t speed_level{0};
393  void encode(ProtoWriteBuffer buffer) const override;
394 #ifdef HAS_PROTO_MESSAGE_DUMP
395  void dump_to(std::string &out) const override;
396 #endif
397 
398  protected:
399  bool decode_32bit(uint32_t field_id, Proto32Bit value) override;
400  bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
401 };
403  public:
404  uint32_t key{0};
405  bool has_state{false};
406  bool state{false};
407  bool has_speed{false};
409  bool has_oscillating{false};
410  bool oscillating{false};
411  bool has_direction{false};
412  enums::FanDirection direction{};
413  bool has_speed_level{false};
414  int32_t speed_level{0};
415  void encode(ProtoWriteBuffer buffer) const override;
416 #ifdef HAS_PROTO_MESSAGE_DUMP
417  void dump_to(std::string &out) const override;
418 #endif
419 
420  protected:
421  bool decode_32bit(uint32_t field_id, Proto32Bit value) override;
422  bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
423 };
425  public:
426  std::string object_id{};
427  uint32_t key{0};
428  std::string name{};
429  std::string unique_id{};
430  std::vector<enums::ColorMode> supported_color_modes{};
431  bool legacy_supports_brightness{false};
432  bool legacy_supports_rgb{false};
433  bool legacy_supports_white_value{false};
434  bool legacy_supports_color_temperature{false};
435  float min_mireds{0.0f};
436  float max_mireds{0.0f};
437  std::vector<std::string> effects{};
438  bool disabled_by_default{false};
439  std::string icon{};
440  enums::EntityCategory entity_category{};
441  void encode(ProtoWriteBuffer buffer) const override;
442 #ifdef HAS_PROTO_MESSAGE_DUMP
443  void dump_to(std::string &out) const override;
444 #endif
445 
446  protected:
447  bool decode_32bit(uint32_t field_id, Proto32Bit value) override;
448  bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override;
449  bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
450 };
452  public:
453  uint32_t key{0};
454  bool state{false};
455  float brightness{0.0f};
456  enums::ColorMode color_mode{};
457  float color_brightness{0.0f};
458  float red{0.0f};
459  float green{0.0f};
460  float blue{0.0f};
461  float white{0.0f};
462  float color_temperature{0.0f};
463  float cold_white{0.0f};
464  float warm_white{0.0f};
465  std::string effect{};
466  void encode(ProtoWriteBuffer buffer) const override;
467 #ifdef HAS_PROTO_MESSAGE_DUMP
468  void dump_to(std::string &out) const override;
469 #endif
470 
471  protected:
472  bool decode_32bit(uint32_t field_id, Proto32Bit value) override;
473  bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override;
474  bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
475 };
477  public:
478  uint32_t key{0};
479  bool has_state{false};
480  bool state{false};
481  bool has_brightness{false};
482  float brightness{0.0f};
483  bool has_color_mode{false};
484  enums::ColorMode color_mode{};
485  bool has_color_brightness{false};
486  float color_brightness{0.0f};
487  bool has_rgb{false};
488  float red{0.0f};
489  float green{0.0f};
490  float blue{0.0f};
491  bool has_white{false};
492  float white{0.0f};
493  bool has_color_temperature{false};
494  float color_temperature{0.0f};
495  bool has_cold_white{false};
496  float cold_white{0.0f};
497  bool has_warm_white{false};
498  float warm_white{0.0f};
499  bool has_transition_length{false};
500  uint32_t transition_length{0};
501  bool has_flash_length{false};
502  uint32_t flash_length{0};
503  bool has_effect{false};
504  std::string effect{};
505  void encode(ProtoWriteBuffer buffer) const override;
506 #ifdef HAS_PROTO_MESSAGE_DUMP
507  void dump_to(std::string &out) const override;
508 #endif
509 
510  protected:
511  bool decode_32bit(uint32_t field_id, Proto32Bit value) override;
512  bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override;
513  bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
514 };
516  public:
517  std::string object_id{};
518  uint32_t key{0};
519  std::string name{};
520  std::string unique_id{};
521  std::string icon{};
522  std::string unit_of_measurement{};
523  int32_t accuracy_decimals{0};
524  bool force_update{false};
525  std::string device_class{};
526  enums::SensorStateClass state_class{};
527  enums::SensorLastResetType legacy_last_reset_type{};
528  bool disabled_by_default{false};
529  enums::EntityCategory entity_category{};
530  void encode(ProtoWriteBuffer buffer) const override;
531 #ifdef HAS_PROTO_MESSAGE_DUMP
532  void dump_to(std::string &out) const override;
533 #endif
534 
535  protected:
536  bool decode_32bit(uint32_t field_id, Proto32Bit value) override;
537  bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override;
538  bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
539 };
541  public:
542  uint32_t key{0};
543  float state{0.0f};
544  bool missing_state{false};
545  void encode(ProtoWriteBuffer buffer) const override;
546 #ifdef HAS_PROTO_MESSAGE_DUMP
547  void dump_to(std::string &out) const override;
548 #endif
549 
550  protected:
551  bool decode_32bit(uint32_t field_id, Proto32Bit value) override;
552  bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
553 };
555  public:
556  std::string object_id{};
557  uint32_t key{0};
558  std::string name{};
559  std::string unique_id{};
560  std::string icon{};
561  bool assumed_state{false};
562  bool disabled_by_default{false};
563  enums::EntityCategory entity_category{};
564  void encode(ProtoWriteBuffer buffer) const override;
565 #ifdef HAS_PROTO_MESSAGE_DUMP
566  void dump_to(std::string &out) const override;
567 #endif
568 
569  protected:
570  bool decode_32bit(uint32_t field_id, Proto32Bit value) override;
571  bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override;
572  bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
573 };
575  public:
576  uint32_t key{0};
577  bool 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  uint32_t key{0};
590  bool state{false};
591  void encode(ProtoWriteBuffer buffer) const override;
592 #ifdef HAS_PROTO_MESSAGE_DUMP
593  void dump_to(std::string &out) const override;
594 #endif
595 
596  protected:
597  bool decode_32bit(uint32_t field_id, Proto32Bit value) override;
598  bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
599 };
601  public:
602  std::string object_id{};
603  uint32_t key{0};
604  std::string name{};
605  std::string unique_id{};
606  std::string icon{};
607  bool disabled_by_default{false};
608  enums::EntityCategory entity_category{};
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  std::string state{};
623  bool missing_state{false};
624  void encode(ProtoWriteBuffer buffer) const override;
625 #ifdef HAS_PROTO_MESSAGE_DUMP
626  void dump_to(std::string &out) const override;
627 #endif
628 
629  protected:
630  bool decode_32bit(uint32_t field_id, Proto32Bit value) override;
631  bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override;
632  bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
633 };
635  public:
637  bool dump_config{false};
638  void encode(ProtoWriteBuffer buffer) const override;
639 #ifdef HAS_PROTO_MESSAGE_DUMP
640  void dump_to(std::string &out) const override;
641 #endif
642 
643  protected:
644  bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
645 };
647  public:
649  std::string message{};
650  bool send_failed{false};
651  void encode(ProtoWriteBuffer buffer) const override;
652 #ifdef HAS_PROTO_MESSAGE_DUMP
653  void dump_to(std::string &out) const override;
654 #endif
655 
656  protected:
657  bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override;
658  bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
659 };
661  public:
662  void encode(ProtoWriteBuffer buffer) const override;
663 #ifdef HAS_PROTO_MESSAGE_DUMP
664  void dump_to(std::string &out) const override;
665 #endif
666 
667  protected:
668 };
670  public:
671  std::string key{};
672  std::string value{};
673  void encode(ProtoWriteBuffer buffer) const override;
674 #ifdef HAS_PROTO_MESSAGE_DUMP
675  void dump_to(std::string &out) const override;
676 #endif
677 
678  protected:
679  bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override;
680 };
682  public:
683  std::string service{};
684  std::vector<HomeassistantServiceMap> data{};
685  std::vector<HomeassistantServiceMap> data_template{};
686  std::vector<HomeassistantServiceMap> variables{};
687  bool is_event{false};
688  void encode(ProtoWriteBuffer buffer) const override;
689 #ifdef HAS_PROTO_MESSAGE_DUMP
690  void dump_to(std::string &out) const override;
691 #endif
692 
693  protected:
694  bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override;
695  bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
696 };
698  public:
699  void encode(ProtoWriteBuffer buffer) const override;
700 #ifdef HAS_PROTO_MESSAGE_DUMP
701  void dump_to(std::string &out) const override;
702 #endif
703 
704  protected:
705 };
707  public:
708  std::string entity_id{};
709  std::string attribute{};
710  void encode(ProtoWriteBuffer buffer) const override;
711 #ifdef HAS_PROTO_MESSAGE_DUMP
712  void dump_to(std::string &out) const override;
713 #endif
714 
715  protected:
716  bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override;
717 };
719  public:
720  std::string entity_id{};
721  std::string state{};
722  std::string attribute{};
723  void encode(ProtoWriteBuffer buffer) const override;
724 #ifdef HAS_PROTO_MESSAGE_DUMP
725  void dump_to(std::string &out) const override;
726 #endif
727 
728  protected:
729  bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override;
730 };
731 class GetTimeRequest : public ProtoMessage {
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  uint32_t epoch_seconds{0};
743  void encode(ProtoWriteBuffer buffer) const override;
744 #ifdef HAS_PROTO_MESSAGE_DUMP
745  void dump_to(std::string &out) const override;
746 #endif
747 
748  protected:
749  bool decode_32bit(uint32_t field_id, Proto32Bit value) override;
750 };
752  public:
753  std::string name{};
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  bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
763 };
765  public:
766  std::string name{};
767  uint32_t key{0};
768  std::vector<ListEntitiesServicesArgument> args{};
769  void encode(ProtoWriteBuffer buffer) const override;
770 #ifdef HAS_PROTO_MESSAGE_DUMP
771  void dump_to(std::string &out) const override;
772 #endif
773 
774  protected:
775  bool decode_32bit(uint32_t field_id, Proto32Bit value) override;
776  bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override;
777 };
779  public:
780  bool bool_{false};
781  int32_t legacy_int{0};
782  float float_{0.0f};
783  std::string string_{};
784  int32_t int_{0};
785  std::vector<bool> bool_array{};
786  std::vector<int32_t> int_array{};
787  std::vector<float> float_array{};
788  std::vector<std::string> string_array{};
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_32bit(uint32_t field_id, Proto32Bit value) override;
796  bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override;
797  bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
798 };
800  public:
801  uint32_t key{0};
802  std::vector<ExecuteServiceArgument> 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  std::string object_id{};
815  uint32_t key{0};
816  std::string name{};
817  std::string unique_id{};
818  bool disabled_by_default{false};
819  std::string icon{};
820  enums::EntityCategory entity_category{};
821  void encode(ProtoWriteBuffer buffer) const override;
822 #ifdef HAS_PROTO_MESSAGE_DUMP
823  void dump_to(std::string &out) const override;
824 #endif
825 
826  protected:
827  bool decode_32bit(uint32_t field_id, Proto32Bit value) override;
828  bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override;
829  bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
830 };
832  public:
833  uint32_t key{0};
834  std::string data{};
835  bool done{false};
836  void encode(ProtoWriteBuffer buffer) const override;
837 #ifdef HAS_PROTO_MESSAGE_DUMP
838  void dump_to(std::string &out) const override;
839 #endif
840 
841  protected:
842  bool decode_32bit(uint32_t field_id, Proto32Bit value) override;
843  bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override;
844  bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
845 };
847  public:
848  bool single{false};
849  bool stream{false};
850  void encode(ProtoWriteBuffer buffer) const override;
851 #ifdef HAS_PROTO_MESSAGE_DUMP
852  void dump_to(std::string &out) const override;
853 #endif
854 
855  protected:
856  bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
857 };
859  public:
860  std::string object_id{};
861  uint32_t key{0};
862  std::string name{};
863  std::string unique_id{};
864  bool supports_current_temperature{false};
865  bool supports_two_point_target_temperature{false};
866  std::vector<enums::ClimateMode> supported_modes{};
867  float visual_min_temperature{0.0f};
868  float visual_max_temperature{0.0f};
869  float visual_temperature_step{0.0f};
870  bool legacy_supports_away{false};
871  bool supports_action{false};
872  std::vector<enums::ClimateFanMode> supported_fan_modes{};
873  std::vector<enums::ClimateSwingMode> supported_swing_modes{};
874  std::vector<std::string> supported_custom_fan_modes{};
875  std::vector<enums::ClimatePreset> supported_presets{};
876  std::vector<std::string> supported_custom_presets{};
877  bool disabled_by_default{false};
878  std::string icon{};
879  enums::EntityCategory entity_category{};
880  void encode(ProtoWriteBuffer buffer) const override;
881 #ifdef HAS_PROTO_MESSAGE_DUMP
882  void dump_to(std::string &out) const override;
883 #endif
884 
885  protected:
886  bool decode_32bit(uint32_t field_id, Proto32Bit value) override;
887  bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override;
888  bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
889 };
891  public:
892  uint32_t key{0};
894  float current_temperature{0.0f};
895  float target_temperature{0.0f};
898  bool legacy_away{false};
902  std::string custom_fan_mode{};
904  std::string custom_preset{};
905  void encode(ProtoWriteBuffer buffer) const override;
906 #ifdef HAS_PROTO_MESSAGE_DUMP
907  void dump_to(std::string &out) const override;
908 #endif
909 
910  protected:
911  bool decode_32bit(uint32_t field_id, Proto32Bit value) override;
912  bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override;
913  bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
914 };
916  public:
917  uint32_t key{0};
918  bool has_mode{false};
920  bool has_target_temperature{false};
921  float target_temperature{0.0f};
922  bool has_target_temperature_low{false};
924  bool has_target_temperature_high{false};
926  bool has_legacy_away{false};
927  bool legacy_away{false};
928  bool has_fan_mode{false};
930  bool has_swing_mode{false};
932  bool has_custom_fan_mode{false};
933  std::string custom_fan_mode{};
934  bool has_preset{false};
936  bool has_custom_preset{false};
937  std::string custom_preset{};
938  void encode(ProtoWriteBuffer buffer) const override;
939 #ifdef HAS_PROTO_MESSAGE_DUMP
940  void dump_to(std::string &out) const override;
941 #endif
942 
943  protected:
944  bool decode_32bit(uint32_t field_id, Proto32Bit value) override;
945  bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override;
946  bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
947 };
949  public:
950  std::string object_id{};
951  uint32_t key{0};
952  std::string name{};
953  std::string unique_id{};
954  std::string icon{};
955  float min_value{0.0f};
956  float max_value{0.0f};
957  float step{0.0f};
958  bool disabled_by_default{false};
959  enums::EntityCategory entity_category{};
960  void encode(ProtoWriteBuffer buffer) const override;
961 #ifdef HAS_PROTO_MESSAGE_DUMP
962  void dump_to(std::string &out) const override;
963 #endif
964 
965  protected:
966  bool decode_32bit(uint32_t field_id, Proto32Bit value) override;
967  bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override;
968  bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
969 };
971  public:
972  uint32_t key{0};
973  float state{0.0f};
974  bool missing_state{false};
975  void encode(ProtoWriteBuffer buffer) const override;
976 #ifdef HAS_PROTO_MESSAGE_DUMP
977  void dump_to(std::string &out) const override;
978 #endif
979 
980  protected:
981  bool decode_32bit(uint32_t field_id, Proto32Bit value) override;
982  bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
983 };
985  public:
986  uint32_t key{0};
987  float state{0.0f};
988  void encode(ProtoWriteBuffer buffer) const override;
989 #ifdef HAS_PROTO_MESSAGE_DUMP
990  void dump_to(std::string &out) const override;
991 #endif
992 
993  protected:
994  bool decode_32bit(uint32_t field_id, Proto32Bit value) override;
995 };
997  public:
998  std::string object_id{};
999  uint32_t key{0};
1000  std::string name{};
1001  std::string unique_id{};
1002  std::string icon{};
1003  std::vector<std::string> options{};
1004  bool disabled_by_default{false};
1005  enums::EntityCategory entity_category{};
1006  void encode(ProtoWriteBuffer buffer) const override;
1007 #ifdef HAS_PROTO_MESSAGE_DUMP
1008  void dump_to(std::string &out) const override;
1009 #endif
1010 
1011  protected:
1012  bool decode_32bit(uint32_t field_id, Proto32Bit value) override;
1013  bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override;
1014  bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
1015 };
1017  public:
1018  uint32_t key{0};
1019  std::string state{};
1020  bool missing_state{false};
1021  void encode(ProtoWriteBuffer buffer) const override;
1022 #ifdef HAS_PROTO_MESSAGE_DUMP
1023  void dump_to(std::string &out) const override;
1024 #endif
1025 
1026  protected:
1027  bool decode_32bit(uint32_t field_id, Proto32Bit value) override;
1028  bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override;
1029  bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
1030 };
1032  public:
1033  uint32_t key{0};
1034  std::string state{};
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  bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override;
1043 };
1044 
1045 } // namespace api
1046 } // namespace esphome
float target_temperature_low
Definition: climate.h:549
Representation of a VarInt - in ProtoBuf should be 64bit but we only use 32bit.
Definition: proto.h:15
float tilt
Definition: cover.h:15
float target_temperature_high
Definition: climate.h:550
ClimateSwingMode swing_mode
Definition: climate.h:545
uint8_t custom_preset
Definition: climate.h:543
uint8_t type
uint8_t options
ClimateFanMode fan_mode
Definition: climate.h:537
ClimateMode mode
Definition: climate.h:534
Library based on https://github.com/miguelbalboa/rfid and adapted to ESPHome by . ...
Definition: a4988.cpp:4
float position
Definition: cover.h:14
uint8_t custom_fan_mode
Definition: climate.h:538
float target_temperature
Definition: climate.h:547
ClimatePreset preset
Definition: climate.h:542