ESPHome  2022.6.2
binary_sensor_map.h
Go to the documentation of this file.
1 #pragma once
2 
6 
7 namespace esphome {
8 namespace binary_sensor_map {
9 
12 };
13 
16  float sensor_value;
17 };
18 
23 class BinarySensorMap : public sensor::Sensor, public Component {
24  public:
25  void dump_config() override;
34  void loop() override;
35  float get_setup_priority() const override { return setup_priority::DATA; }
42  void add_channel(binary_sensor::BinarySensor *sensor, float value);
43  void set_sensor_type(BinarySensorMapType sensor_type);
44 
45  protected:
46  std::vector<BinarySensorMapChannel> channels_{};
48  // this gives max 64 channels per binary_sensor_map
49  uint64_t last_mask_{0x00};
54  void process_group_();
55 };
56 
57 } // namespace binary_sensor_map
58 } // namespace esphome
void loop()
const float DATA
For components that import data from directly connected sensors like DHT.
Definition: component.cpp:18
Class to group binary_sensors to one Sensor.
Definition: a4988.cpp:4
Base class for all binary_sensor-type classes.
Definition: binary_sensor.h:26
Base-class for all sensors.
Definition: sensor.h:47