ESPHome  2024.11.1
vbus_binary_sensor.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include "../vbus.h"
5 
6 namespace esphome {
7 namespace vbus {
8 
10  public:
11  void dump_config() override;
23  void set_hqm_bsensor(binary_sensor::BinarySensor *bsensor) { this->hqm_bsensor_ = bsensor; }
24 
25  protected:
38 
39  void handle_message(std::vector<uint8_t> &message) override;
40 };
41 
43  public:
44  void dump_config() override;
50  this->frost_protection_active_bsensor_ = bsensor;
51  }
52 
53  protected:
58  binary_sensor::BinarySensor *frost_protection_active_bsensor_{nullptr};
59 
60  void handle_message(std::vector<uint8_t> &message) override;
61 };
62 
63 class DeltaSolCBSensor : public VBusListener, public Component {
64  public:
65  void dump_config() override;
70 
71  protected:
76 
77  void handle_message(std::vector<uint8_t> &message) override;
78 };
79 
80 class DeltaSolCS2BSensor : public VBusListener, public Component {
81  public:
82  void dump_config() override;
87 
88  protected:
93 
94  void handle_message(std::vector<uint8_t> &message) override;
95 };
96 
98  public:
99  void dump_config() override;
104 
105  protected:
110 
111  void handle_message(std::vector<uint8_t> &message) override;
112 };
113 
115 
116 class VBusCustomBSensor : public VBusListener, public Component {
117  public:
118  void dump_config() override;
119  void set_bsensors(std::vector<VBusCustomSubBSensor *> bsensors) { this->bsensors_ = std::move(bsensors); };
120 
121  protected:
122  std::vector<VBusCustomSubBSensor *> bsensors_;
123  void handle_message(std::vector<uint8_t> &message) override;
124 };
125 
127  public:
128  void set_message_parser(message_parser_t parser) { this->message_parser_ = std::move(parser); };
129  void parse_message(std::vector<uint8_t> &message);
130 
131  protected:
133 };
134 
135 } // namespace vbus
136 } // namespace esphome
binary_sensor::BinarySensor * s2_error_bsensor_
void set_relay2_bsensor(binary_sensor::BinarySensor *bsensor)
binary_sensor::BinarySensor * s3_error_bsensor_
void set_bsensors(std::vector< VBusCustomSubBSensor *> bsensors)
void set_message_parser(message_parser_t parser)
void set_s4_error_bsensor(binary_sensor::BinarySensor *bsensor)
void set_s3_error_bsensor(binary_sensor::BinarySensor *bsensor)
void set_s1_error_bsensor(binary_sensor::BinarySensor *bsensor)
void set_s2_error_bsensor(binary_sensor::BinarySensor *bsensor)
void set_s2_error_bsensor(binary_sensor::BinarySensor *bsensor)
void set_s3_error_bsensor(binary_sensor::BinarySensor *bsensor)
std::function< float(std::vector< uint8_t > &)> message_parser_t
Definition: vbus.h:9
binary_sensor::BinarySensor * s4_error_bsensor_
void handle_message(std::vector< uint8_t > &message) override
void set_s1_error_bsensor(binary_sensor::BinarySensor *bsensor)
void set_s2_error_bsensor(binary_sensor::BinarySensor *bsensor)
void set_collector_max_bsensor(binary_sensor::BinarySensor *bsensor)
void set_s4_error_bsensor(binary_sensor::BinarySensor *bsensor)
void set_s2_error_bsensor(binary_sensor::BinarySensor *bsensor)
void set_collector_min_bsensor(binary_sensor::BinarySensor *bsensor)
void set_hqm_bsensor(binary_sensor::BinarySensor *bsensor)
void set_tube_collector_bsensor(binary_sensor::BinarySensor *bsensor)
void set_s1_error_bsensor(binary_sensor::BinarySensor *bsensor)
void set_s1_error_bsensor(binary_sensor::BinarySensor *bsensor)
void set_s4_error_bsensor(binary_sensor::BinarySensor *bsensor)
void set_s3_error_bsensor(binary_sensor::BinarySensor *bsensor)
void set_s2_error_bsensor(binary_sensor::BinarySensor *bsensor)
void set_s4_error_bsensor(binary_sensor::BinarySensor *bsensor)
binary_sensor::BinarySensor * tube_collector_bsensor_
binary_sensor::BinarySensor * relay2_bsensor_
void set_s4_error_bsensor(binary_sensor::BinarySensor *bsensor)
void set_relay1_bsensor(binary_sensor::BinarySensor *bsensor)
binary_sensor::BinarySensor * s1_error_bsensor_
void set_s3_error_bsensor(binary_sensor::BinarySensor *bsensor)
binary_sensor::BinarySensor * collector_frost_bsensor_
void set_collector_frost_bsensor(binary_sensor::BinarySensor *bsensor)
binary_sensor::BinarySensor * collector_min_bsensor_
binary_sensor::BinarySensor * recooling_bsensor_
void set_frost_protection_active_bsensor(binary_sensor::BinarySensor *bsensor)
Implementation of SPI Controller mode.
Definition: a01nyub.cpp:7
Base class for all binary_sensor-type classes.
Definition: binary_sensor.h:37
void set_s1_error_bsensor(binary_sensor::BinarySensor *bsensor)
binary_sensor::BinarySensor * hqm_bsensor_
void set_recooling_bsensor(binary_sensor::BinarySensor *bsensor)
void set_s3_error_bsensor(binary_sensor::BinarySensor *bsensor)
binary_sensor::BinarySensor * relay1_bsensor_
binary_sensor::BinarySensor * collector_max_bsensor_