ESPHome  2022.6.2
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 enum NumberMode : uint32_t {
130 };
131 enum LockState : uint32_t {
138 };
139 enum LockCommand : uint32_t {
143 };
144 enum MediaPlayerState : uint32_t {
149 };
150 enum MediaPlayerCommand : uint32_t {
156 };
157 
158 } // namespace enums
159 
160 class HelloRequest : public ProtoMessage {
161  public:
162  std::string client_info{};
163  void encode(ProtoWriteBuffer buffer) const override;
164 #ifdef HAS_PROTO_MESSAGE_DUMP
165  void dump_to(std::string &out) const override;
166 #endif
167 
168  protected:
169  bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override;
170 };
171 class HelloResponse : public ProtoMessage {
172  public:
173  uint32_t api_version_major{0};
174  uint32_t api_version_minor{0};
175  std::string server_info{};
176  std::string name{};
177  void encode(ProtoWriteBuffer buffer) const override;
178 #ifdef HAS_PROTO_MESSAGE_DUMP
179  void dump_to(std::string &out) const override;
180 #endif
181 
182  protected:
183  bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override;
184  bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
185 };
186 class ConnectRequest : public ProtoMessage {
187  public:
188  std::string password{};
189  void encode(ProtoWriteBuffer buffer) const override;
190 #ifdef HAS_PROTO_MESSAGE_DUMP
191  void dump_to(std::string &out) const override;
192 #endif
193 
194  protected:
195  bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override;
196 };
198  public:
199  bool invalid_password{false};
200  void encode(ProtoWriteBuffer buffer) const override;
201 #ifdef HAS_PROTO_MESSAGE_DUMP
202  void dump_to(std::string &out) const override;
203 #endif
204 
205  protected:
206  bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
207 };
209  public:
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 };
218  public:
219  void encode(ProtoWriteBuffer buffer) const override;
220 #ifdef HAS_PROTO_MESSAGE_DUMP
221  void dump_to(std::string &out) const override;
222 #endif
223 
224  protected:
225 };
226 class PingRequest : public ProtoMessage {
227  public:
228  void encode(ProtoWriteBuffer buffer) const override;
229 #ifdef HAS_PROTO_MESSAGE_DUMP
230  void dump_to(std::string &out) const override;
231 #endif
232 
233  protected:
234 };
235 class PingResponse : public ProtoMessage {
236  public:
237  void encode(ProtoWriteBuffer buffer) const override;
238 #ifdef HAS_PROTO_MESSAGE_DUMP
239  void dump_to(std::string &out) const override;
240 #endif
241 
242  protected:
243 };
245  public:
246  void encode(ProtoWriteBuffer buffer) const override;
247 #ifdef HAS_PROTO_MESSAGE_DUMP
248  void dump_to(std::string &out) const override;
249 #endif
250 
251  protected:
252 };
254  public:
255  bool uses_password{false};
256  std::string name{};
257  std::string mac_address{};
258  std::string esphome_version{};
259  std::string compilation_time{};
260  std::string model{};
261  bool has_deep_sleep{false};
262  std::string project_name{};
263  std::string project_version{};
264  uint32_t webserver_port{0};
265  void encode(ProtoWriteBuffer buffer) const override;
266 #ifdef HAS_PROTO_MESSAGE_DUMP
267  void dump_to(std::string &out) const override;
268 #endif
269 
270  protected:
271  bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override;
272  bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
273 };
275  public:
276  void encode(ProtoWriteBuffer buffer) const override;
277 #ifdef HAS_PROTO_MESSAGE_DUMP
278  void dump_to(std::string &out) const override;
279 #endif
280 
281  protected:
282 };
284  public:
285  void encode(ProtoWriteBuffer buffer) const override;
286 #ifdef HAS_PROTO_MESSAGE_DUMP
287  void dump_to(std::string &out) const override;
288 #endif
289 
290  protected:
291 };
293  public:
294  void encode(ProtoWriteBuffer buffer) const override;
295 #ifdef HAS_PROTO_MESSAGE_DUMP
296  void dump_to(std::string &out) const override;
297 #endif
298 
299  protected:
300 };
302  public:
303  std::string object_id{};
304  uint32_t key{0};
305  std::string name{};
306  std::string unique_id{};
307  std::string device_class{};
308  bool is_status_binary_sensor{false};
309  bool disabled_by_default{false};
310  std::string icon{};
311  enums::EntityCategory entity_category{};
312  void encode(ProtoWriteBuffer buffer) const override;
313 #ifdef HAS_PROTO_MESSAGE_DUMP
314  void dump_to(std::string &out) const override;
315 #endif
316 
317  protected:
318  bool decode_32bit(uint32_t field_id, Proto32Bit value) override;
319  bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override;
320  bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
321 };
323  public:
324  uint32_t key{0};
325  bool state{false};
326  bool missing_state{false};
327  void encode(ProtoWriteBuffer buffer) const override;
328 #ifdef HAS_PROTO_MESSAGE_DUMP
329  void dump_to(std::string &out) const override;
330 #endif
331 
332  protected:
333  bool decode_32bit(uint32_t field_id, Proto32Bit value) override;
334  bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
335 };
337  public:
338  std::string object_id{};
339  uint32_t key{0};
340  std::string name{};
341  std::string unique_id{};
342  bool assumed_state{false};
343  bool supports_position{false};
344  bool supports_tilt{false};
345  std::string device_class{};
346  bool disabled_by_default{false};
347  std::string icon{};
348  enums::EntityCategory entity_category{};
349  void encode(ProtoWriteBuffer buffer) const override;
350 #ifdef HAS_PROTO_MESSAGE_DUMP
351  void dump_to(std::string &out) const override;
352 #endif
353 
354  protected:
355  bool decode_32bit(uint32_t field_id, Proto32Bit value) override;
356  bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override;
357  bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
358 };
360  public:
361  uint32_t key{0};
362  enums::LegacyCoverState legacy_state{};
363  float position{0.0f};
364  float tilt{0.0f};
365  enums::CoverOperation current_operation{};
366  void encode(ProtoWriteBuffer buffer) const override;
367 #ifdef HAS_PROTO_MESSAGE_DUMP
368  void dump_to(std::string &out) const override;
369 #endif
370 
371  protected:
372  bool decode_32bit(uint32_t field_id, Proto32Bit value) override;
373  bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
374 };
376  public:
377  uint32_t key{0};
378  bool has_legacy_command{false};
379  enums::LegacyCoverCommand legacy_command{};
380  bool has_position{false};
381  float position{0.0f};
382  bool has_tilt{false};
383  float tilt{0.0f};
384  bool stop{false};
385  void encode(ProtoWriteBuffer buffer) const override;
386 #ifdef HAS_PROTO_MESSAGE_DUMP
387  void dump_to(std::string &out) const override;
388 #endif
389 
390  protected:
391  bool decode_32bit(uint32_t field_id, Proto32Bit value) override;
392  bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
393 };
395  public:
396  std::string object_id{};
397  uint32_t key{0};
398  std::string name{};
399  std::string unique_id{};
400  bool supports_oscillation{false};
401  bool supports_speed{false};
402  bool supports_direction{false};
403  int32_t supported_speed_count{0};
404  bool disabled_by_default{false};
405  std::string icon{};
406  enums::EntityCategory entity_category{};
407  void encode(ProtoWriteBuffer buffer) const override;
408 #ifdef HAS_PROTO_MESSAGE_DUMP
409  void dump_to(std::string &out) const override;
410 #endif
411 
412  protected:
413  bool decode_32bit(uint32_t field_id, Proto32Bit value) override;
414  bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override;
415  bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
416 };
418  public:
419  uint32_t key{0};
420  bool state{false};
421  bool oscillating{false};
424  int32_t speed_level{0};
425  void encode(ProtoWriteBuffer buffer) const override;
426 #ifdef HAS_PROTO_MESSAGE_DUMP
427  void dump_to(std::string &out) const override;
428 #endif
429 
430  protected:
431  bool decode_32bit(uint32_t field_id, Proto32Bit value) override;
432  bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
433 };
435  public:
436  uint32_t key{0};
437  bool has_state{false};
438  bool state{false};
439  bool has_speed{false};
441  bool has_oscillating{false};
442  bool oscillating{false};
443  bool has_direction{false};
445  bool has_speed_level{false};
446  int32_t speed_level{0};
447  void encode(ProtoWriteBuffer buffer) const override;
448 #ifdef HAS_PROTO_MESSAGE_DUMP
449  void dump_to(std::string &out) const override;
450 #endif
451 
452  protected:
453  bool decode_32bit(uint32_t field_id, Proto32Bit value) override;
454  bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
455 };
457  public:
458  std::string object_id{};
459  uint32_t key{0};
460  std::string name{};
461  std::string unique_id{};
462  std::vector<enums::ColorMode> supported_color_modes{};
463  bool legacy_supports_brightness{false};
464  bool legacy_supports_rgb{false};
465  bool legacy_supports_white_value{false};
466  bool legacy_supports_color_temperature{false};
467  float min_mireds{0.0f};
468  float max_mireds{0.0f};
469  std::vector<std::string> effects{};
470  bool disabled_by_default{false};
471  std::string icon{};
472  enums::EntityCategory entity_category{};
473  void encode(ProtoWriteBuffer buffer) const override;
474 #ifdef HAS_PROTO_MESSAGE_DUMP
475  void dump_to(std::string &out) const override;
476 #endif
477 
478  protected:
479  bool decode_32bit(uint32_t field_id, Proto32Bit value) override;
480  bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override;
481  bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
482 };
484  public:
485  uint32_t key{0};
486  bool state{false};
487  float brightness{0.0f};
488  enums::ColorMode color_mode{};
489  float color_brightness{0.0f};
490  float red{0.0f};
491  float green{0.0f};
492  float blue{0.0f};
493  float white{0.0f};
494  float color_temperature{0.0f};
495  float cold_white{0.0f};
496  float warm_white{0.0f};
497  std::string effect{};
498  void encode(ProtoWriteBuffer buffer) const override;
499 #ifdef HAS_PROTO_MESSAGE_DUMP
500  void dump_to(std::string &out) const override;
501 #endif
502 
503  protected:
504  bool decode_32bit(uint32_t field_id, Proto32Bit value) override;
505  bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override;
506  bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
507 };
509  public:
510  uint32_t key{0};
511  bool has_state{false};
512  bool state{false};
513  bool has_brightness{false};
514  float brightness{0.0f};
515  bool has_color_mode{false};
516  enums::ColorMode color_mode{};
517  bool has_color_brightness{false};
518  float color_brightness{0.0f};
519  bool has_rgb{false};
520  float red{0.0f};
521  float green{0.0f};
522  float blue{0.0f};
523  bool has_white{false};
524  float white{0.0f};
525  bool has_color_temperature{false};
526  float color_temperature{0.0f};
527  bool has_cold_white{false};
528  float cold_white{0.0f};
529  bool has_warm_white{false};
530  float warm_white{0.0f};
531  bool has_transition_length{false};
532  uint32_t transition_length{0};
533  bool has_flash_length{false};
534  uint32_t flash_length{0};
535  bool has_effect{false};
536  std::string effect{};
537  void encode(ProtoWriteBuffer buffer) const override;
538 #ifdef HAS_PROTO_MESSAGE_DUMP
539  void dump_to(std::string &out) const override;
540 #endif
541 
542  protected:
543  bool decode_32bit(uint32_t field_id, Proto32Bit value) override;
544  bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override;
545  bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
546 };
548  public:
549  std::string object_id{};
550  uint32_t key{0};
551  std::string name{};
552  std::string unique_id{};
553  std::string icon{};
554  std::string unit_of_measurement{};
555  int32_t accuracy_decimals{0};
556  bool force_update{false};
557  std::string device_class{};
558  enums::SensorStateClass state_class{};
559  enums::SensorLastResetType legacy_last_reset_type{};
560  bool disabled_by_default{false};
561  enums::EntityCategory entity_category{};
562  void encode(ProtoWriteBuffer buffer) const override;
563 #ifdef HAS_PROTO_MESSAGE_DUMP
564  void dump_to(std::string &out) const override;
565 #endif
566 
567  protected:
568  bool decode_32bit(uint32_t field_id, Proto32Bit value) override;
569  bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override;
570  bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
571 };
573  public:
574  uint32_t key{0};
575  float state{0.0f};
576  bool missing_state{false};
577  void encode(ProtoWriteBuffer buffer) const override;
578 #ifdef HAS_PROTO_MESSAGE_DUMP
579  void dump_to(std::string &out) const override;
580 #endif
581 
582  protected:
583  bool decode_32bit(uint32_t field_id, Proto32Bit value) override;
584  bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
585 };
587  public:
588  std::string object_id{};
589  uint32_t key{0};
590  std::string name{};
591  std::string unique_id{};
592  std::string icon{};
593  bool assumed_state{false};
594  bool disabled_by_default{false};
595  enums::EntityCategory entity_category{};
596  std::string device_class{};
597  void encode(ProtoWriteBuffer buffer) const override;
598 #ifdef HAS_PROTO_MESSAGE_DUMP
599  void dump_to(std::string &out) const override;
600 #endif
601 
602  protected:
603  bool decode_32bit(uint32_t field_id, Proto32Bit value) override;
604  bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override;
605  bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
606 };
608  public:
609  uint32_t key{0};
610  bool state{false};
611  void encode(ProtoWriteBuffer buffer) const override;
612 #ifdef HAS_PROTO_MESSAGE_DUMP
613  void dump_to(std::string &out) const override;
614 #endif
615 
616  protected:
617  bool decode_32bit(uint32_t field_id, Proto32Bit value) override;
618  bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
619 };
621  public:
622  uint32_t key{0};
623  bool 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_varint(uint32_t field_id, ProtoVarInt value) override;
632 };
634  public:
635  std::string object_id{};
636  uint32_t key{0};
637  std::string name{};
638  std::string unique_id{};
639  std::string icon{};
640  bool disabled_by_default{false};
641  enums::EntityCategory entity_category{};
642  void encode(ProtoWriteBuffer buffer) const override;
643 #ifdef HAS_PROTO_MESSAGE_DUMP
644  void dump_to(std::string &out) const override;
645 #endif
646 
647  protected:
648  bool decode_32bit(uint32_t field_id, Proto32Bit value) override;
649  bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override;
650  bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
651 };
653  public:
654  uint32_t key{0};
655  std::string state{};
656  bool missing_state{false};
657  void encode(ProtoWriteBuffer buffer) const override;
658 #ifdef HAS_PROTO_MESSAGE_DUMP
659  void dump_to(std::string &out) const override;
660 #endif
661 
662  protected:
663  bool decode_32bit(uint32_t field_id, Proto32Bit value) override;
664  bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override;
665  bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
666 };
668  public:
670  bool dump_config{false};
671  void encode(ProtoWriteBuffer buffer) const override;
672 #ifdef HAS_PROTO_MESSAGE_DUMP
673  void dump_to(std::string &out) const override;
674 #endif
675 
676  protected:
677  bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
678 };
680  public:
682  std::string message{};
683  bool send_failed{false};
684  void encode(ProtoWriteBuffer buffer) const override;
685 #ifdef HAS_PROTO_MESSAGE_DUMP
686  void dump_to(std::string &out) const override;
687 #endif
688 
689  protected:
690  bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override;
691  bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
692 };
694  public:
695  void encode(ProtoWriteBuffer buffer) const override;
696 #ifdef HAS_PROTO_MESSAGE_DUMP
697  void dump_to(std::string &out) const override;
698 #endif
699 
700  protected:
701 };
703  public:
704  std::string key{};
705  std::string value{};
706  void encode(ProtoWriteBuffer buffer) const override;
707 #ifdef HAS_PROTO_MESSAGE_DUMP
708  void dump_to(std::string &out) const override;
709 #endif
710 
711  protected:
712  bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override;
713 };
715  public:
716  std::string service{};
717  std::vector<HomeassistantServiceMap> data{};
718  std::vector<HomeassistantServiceMap> data_template{};
719  std::vector<HomeassistantServiceMap> variables{};
720  bool is_event{false};
721  void encode(ProtoWriteBuffer buffer) const override;
722 #ifdef HAS_PROTO_MESSAGE_DUMP
723  void dump_to(std::string &out) const override;
724 #endif
725 
726  protected:
727  bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override;
728  bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
729 };
731  public:
732  void encode(ProtoWriteBuffer buffer) const override;
733 #ifdef HAS_PROTO_MESSAGE_DUMP
734  void dump_to(std::string &out) const override;
735 #endif
736 
737  protected:
738 };
740  public:
741  std::string entity_id{};
742  std::string attribute{};
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_length(uint32_t field_id, ProtoLengthDelimited value) override;
750 };
752  public:
753  std::string entity_id{};
754  std::string state{};
755  std::string attribute{};
756  void encode(ProtoWriteBuffer buffer) const override;
757 #ifdef HAS_PROTO_MESSAGE_DUMP
758  void dump_to(std::string &out) const override;
759 #endif
760 
761  protected:
762  bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override;
763 };
764 class GetTimeRequest : public ProtoMessage {
765  public:
766  void encode(ProtoWriteBuffer buffer) const override;
767 #ifdef HAS_PROTO_MESSAGE_DUMP
768  void dump_to(std::string &out) const override;
769 #endif
770 
771  protected:
772 };
774  public:
775  uint32_t epoch_seconds{0};
776  void encode(ProtoWriteBuffer buffer) const override;
777 #ifdef HAS_PROTO_MESSAGE_DUMP
778  void dump_to(std::string &out) const override;
779 #endif
780 
781  protected:
782  bool decode_32bit(uint32_t field_id, Proto32Bit value) override;
783 };
785  public:
786  std::string name{};
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_length(uint32_t field_id, ProtoLengthDelimited value) override;
795  bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
796 };
798  public:
799  std::string name{};
800  uint32_t key{0};
801  std::vector<ListEntitiesServicesArgument> args{};
802  void encode(ProtoWriteBuffer buffer) const override;
803 #ifdef HAS_PROTO_MESSAGE_DUMP
804  void dump_to(std::string &out) const override;
805 #endif
806 
807  protected:
808  bool decode_32bit(uint32_t field_id, Proto32Bit value) override;
809  bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override;
810 };
812  public:
813  bool bool_{false};
814  int32_t legacy_int{0};
815  float float_{0.0f};
816  std::string string_{};
817  int32_t int_{0};
818  std::vector<bool> bool_array{};
819  std::vector<int32_t> int_array{};
820  std::vector<float> float_array{};
821  std::vector<std::string> string_array{};
822  void encode(ProtoWriteBuffer buffer) const override;
823 #ifdef HAS_PROTO_MESSAGE_DUMP
824  void dump_to(std::string &out) const override;
825 #endif
826 
827  protected:
828  bool decode_32bit(uint32_t field_id, Proto32Bit value) override;
829  bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override;
830  bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
831 };
833  public:
834  uint32_t key{0};
835  std::vector<ExecuteServiceArgument> args{};
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 };
846  public:
847  std::string object_id{};
848  uint32_t key{0};
849  std::string name{};
850  std::string unique_id{};
851  bool disabled_by_default{false};
852  std::string icon{};
853  enums::EntityCategory entity_category{};
854  void encode(ProtoWriteBuffer buffer) const override;
855 #ifdef HAS_PROTO_MESSAGE_DUMP
856  void dump_to(std::string &out) const override;
857 #endif
858 
859  protected:
860  bool decode_32bit(uint32_t field_id, Proto32Bit value) override;
861  bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override;
862  bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
863 };
865  public:
866  uint32_t key{0};
867  std::string data{};
868  bool done{false};
869  void encode(ProtoWriteBuffer buffer) const override;
870 #ifdef HAS_PROTO_MESSAGE_DUMP
871  void dump_to(std::string &out) const override;
872 #endif
873 
874  protected:
875  bool decode_32bit(uint32_t field_id, Proto32Bit value) override;
876  bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override;
877  bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
878 };
880  public:
881  bool single{false};
882  bool stream{false};
883  void encode(ProtoWriteBuffer buffer) const override;
884 #ifdef HAS_PROTO_MESSAGE_DUMP
885  void dump_to(std::string &out) const override;
886 #endif
887 
888  protected:
889  bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
890 };
892  public:
893  std::string object_id{};
894  uint32_t key{0};
895  std::string name{};
896  std::string unique_id{};
897  bool supports_current_temperature{false};
898  bool supports_two_point_target_temperature{false};
899  std::vector<enums::ClimateMode> supported_modes{};
900  float visual_min_temperature{0.0f};
901  float visual_max_temperature{0.0f};
902  float visual_temperature_step{0.0f};
903  bool legacy_supports_away{false};
904  bool supports_action{false};
905  std::vector<enums::ClimateFanMode> supported_fan_modes{};
906  std::vector<enums::ClimateSwingMode> supported_swing_modes{};
907  std::vector<std::string> supported_custom_fan_modes{};
908  std::vector<enums::ClimatePreset> supported_presets{};
909  std::vector<std::string> supported_custom_presets{};
910  bool disabled_by_default{false};
911  std::string icon{};
912  enums::EntityCategory entity_category{};
913  void encode(ProtoWriteBuffer buffer) const override;
914 #ifdef HAS_PROTO_MESSAGE_DUMP
915  void dump_to(std::string &out) const override;
916 #endif
917 
918  protected:
919  bool decode_32bit(uint32_t field_id, Proto32Bit value) override;
920  bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override;
921  bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
922 };
924  public:
925  uint32_t key{0};
927  float current_temperature{0.0f};
928  float target_temperature{0.0f};
931  bool legacy_away{false};
935  std::string custom_fan_mode{};
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  uint32_t key{0};
951  bool has_mode{false};
953  bool has_target_temperature{false};
954  float target_temperature{0.0f};
955  bool has_target_temperature_low{false};
957  bool has_target_temperature_high{false};
959  bool has_legacy_away{false};
960  bool legacy_away{false};
961  bool has_fan_mode{false};
963  bool has_swing_mode{false};
965  bool has_custom_fan_mode{false};
966  std::string custom_fan_mode{};
967  bool has_preset{false};
969  bool has_custom_preset{false};
970  std::string custom_preset{};
971  void encode(ProtoWriteBuffer buffer) const override;
972 #ifdef HAS_PROTO_MESSAGE_DUMP
973  void dump_to(std::string &out) const override;
974 #endif
975 
976  protected:
977  bool decode_32bit(uint32_t field_id, Proto32Bit value) override;
978  bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override;
979  bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
980 };
982  public:
983  std::string object_id{};
984  uint32_t key{0};
985  std::string name{};
986  std::string unique_id{};
987  std::string icon{};
988  float min_value{0.0f};
989  float max_value{0.0f};
990  float step{0.0f};
991  bool disabled_by_default{false};
992  enums::EntityCategory entity_category{};
993  std::string unit_of_measurement{};
995  void encode(ProtoWriteBuffer buffer) const override;
996 #ifdef HAS_PROTO_MESSAGE_DUMP
997  void dump_to(std::string &out) const override;
998 #endif
999 
1000  protected:
1001  bool decode_32bit(uint32_t field_id, Proto32Bit value) override;
1002  bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override;
1003  bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
1004 };
1006  public:
1007  uint32_t key{0};
1008  float state{0.0f};
1009  bool missing_state{false};
1010  void encode(ProtoWriteBuffer buffer) const override;
1011 #ifdef HAS_PROTO_MESSAGE_DUMP
1012  void dump_to(std::string &out) const override;
1013 #endif
1014 
1015  protected:
1016  bool decode_32bit(uint32_t field_id, Proto32Bit value) override;
1017  bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
1018 };
1020  public:
1021  uint32_t key{0};
1022  float state{0.0f};
1023  void encode(ProtoWriteBuffer buffer) const override;
1024 #ifdef HAS_PROTO_MESSAGE_DUMP
1025  void dump_to(std::string &out) const override;
1026 #endif
1027 
1028  protected:
1029  bool decode_32bit(uint32_t field_id, Proto32Bit value) override;
1030 };
1032  public:
1033  std::string object_id{};
1034  uint32_t key{0};
1035  std::string name{};
1036  std::string unique_id{};
1037  std::string icon{};
1038  std::vector<std::string> options{};
1039  bool disabled_by_default{false};
1040  enums::EntityCategory entity_category{};
1041  void encode(ProtoWriteBuffer buffer) const override;
1042 #ifdef HAS_PROTO_MESSAGE_DUMP
1043  void dump_to(std::string &out) const override;
1044 #endif
1045 
1046  protected:
1047  bool decode_32bit(uint32_t field_id, Proto32Bit value) override;
1048  bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override;
1049  bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
1050 };
1052  public:
1053  uint32_t key{0};
1054  std::string state{};
1055  bool missing_state{false};
1056  void encode(ProtoWriteBuffer buffer) const override;
1057 #ifdef HAS_PROTO_MESSAGE_DUMP
1058  void dump_to(std::string &out) const override;
1059 #endif
1060 
1061  protected:
1062  bool decode_32bit(uint32_t field_id, Proto32Bit value) override;
1063  bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override;
1064  bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
1065 };
1067  public:
1068  uint32_t key{0};
1069  std::string state{};
1070  void encode(ProtoWriteBuffer buffer) const override;
1071 #ifdef HAS_PROTO_MESSAGE_DUMP
1072  void dump_to(std::string &out) const override;
1073 #endif
1074 
1075  protected:
1076  bool decode_32bit(uint32_t field_id, Proto32Bit value) override;
1077  bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override;
1078 };
1080  public:
1081  std::string object_id{};
1082  uint32_t key{0};
1083  std::string name{};
1084  std::string unique_id{};
1085  std::string icon{};
1086  bool disabled_by_default{false};
1087  enums::EntityCategory entity_category{};
1088  bool assumed_state{false};
1089  bool supports_open{false};
1090  bool requires_code{false};
1091  std::string code_format{};
1092  void encode(ProtoWriteBuffer buffer) const override;
1093 #ifdef HAS_PROTO_MESSAGE_DUMP
1094  void dump_to(std::string &out) const override;
1095 #endif
1096 
1097  protected:
1098  bool decode_32bit(uint32_t field_id, Proto32Bit value) override;
1099  bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override;
1100  bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
1101 };
1103  public:
1104  uint32_t key{0};
1106  void encode(ProtoWriteBuffer buffer) const override;
1107 #ifdef HAS_PROTO_MESSAGE_DUMP
1108  void dump_to(std::string &out) const override;
1109 #endif
1110 
1111  protected:
1112  bool decode_32bit(uint32_t field_id, Proto32Bit value) override;
1113  bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
1114 };
1116  public:
1117  uint32_t key{0};
1119  bool has_code{false};
1120  std::string code{};
1121  void encode(ProtoWriteBuffer buffer) const override;
1122 #ifdef HAS_PROTO_MESSAGE_DUMP
1123  void dump_to(std::string &out) const override;
1124 #endif
1125 
1126  protected:
1127  bool decode_32bit(uint32_t field_id, Proto32Bit value) override;
1128  bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override;
1129  bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
1130 };
1132  public:
1133  std::string object_id{};
1134  uint32_t key{0};
1135  std::string name{};
1136  std::string unique_id{};
1137  std::string icon{};
1138  bool disabled_by_default{false};
1139  enums::EntityCategory entity_category{};
1140  std::string device_class{};
1141  void encode(ProtoWriteBuffer buffer) const override;
1142 #ifdef HAS_PROTO_MESSAGE_DUMP
1143  void dump_to(std::string &out) const override;
1144 #endif
1145 
1146  protected:
1147  bool decode_32bit(uint32_t field_id, Proto32Bit value) override;
1148  bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override;
1149  bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
1150 };
1152  public:
1153  uint32_t key{0};
1154  void encode(ProtoWriteBuffer buffer) const override;
1155 #ifdef HAS_PROTO_MESSAGE_DUMP
1156  void dump_to(std::string &out) const override;
1157 #endif
1158 
1159  protected:
1160  bool decode_32bit(uint32_t field_id, Proto32Bit value) override;
1161 };
1163  public:
1164  std::string object_id{};
1165  uint32_t key{0};
1166  std::string name{};
1167  std::string unique_id{};
1168  std::string icon{};
1169  bool disabled_by_default{false};
1170  enums::EntityCategory entity_category{};
1171  bool supports_pause{false};
1172  void encode(ProtoWriteBuffer buffer) const override;
1173 #ifdef HAS_PROTO_MESSAGE_DUMP
1174  void dump_to(std::string &out) const override;
1175 #endif
1176 
1177  protected:
1178  bool decode_32bit(uint32_t field_id, Proto32Bit value) override;
1179  bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override;
1180  bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
1181 };
1183  public:
1184  uint32_t key{0};
1186  float volume{0.0f};
1187  bool muted{false};
1188  void encode(ProtoWriteBuffer buffer) const override;
1189 #ifdef HAS_PROTO_MESSAGE_DUMP
1190  void dump_to(std::string &out) const override;
1191 #endif
1192 
1193  protected:
1194  bool decode_32bit(uint32_t field_id, Proto32Bit value) override;
1195  bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
1196 };
1198  public:
1199  uint32_t key{0};
1200  bool has_command{false};
1202  bool has_volume{false};
1203  float volume{0.0f};
1204  bool has_media_url{false};
1205  std::string media_url{};
1206  void encode(ProtoWriteBuffer buffer) const override;
1207 #ifdef HAS_PROTO_MESSAGE_DUMP
1208  void dump_to(std::string &out) const override;
1209 #endif
1210 
1211  protected:
1212  bool decode_32bit(uint32_t field_id, Proto32Bit value) override;
1213  bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override;
1214  bool decode_varint(uint32_t field_id, ProtoVarInt value) override;
1215 };
1216 
1217 } // namespace api
1218 } // namespace esphome
float target_temperature_low
Definition: climate.h:552
const char * name
Definition: stm32flash.h:78
BedjetMode mode
BedJet operating mode.
Definition: bedjet_base.h:102
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
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