ESPHome  2024.3.2
airthings_wave_plus.h
Go to the documentation of this file.
1 #pragma once
2 
3 #ifdef USE_ESP32
4 
6 
7 namespace esphome {
8 namespace airthings_wave_plus {
9 
11 
12 static const char *const SERVICE_UUID = "b42e1c08-ade7-11e4-89d3-123b93f75cba";
13 static const char *const CHARACTERISTIC_UUID = "b42e2a68-ade7-11e4-89d3-123b93f75cba";
14 static const char *const ACCESS_CONTROL_POINT_CHARACTERISTIC_UUID = "b42e2d06-ade7-11e4-89d3-123b93f75cba";
15 
17  public:
19 
20  void dump_config() override;
21 
22  void set_radon(sensor::Sensor *radon) { radon_sensor_ = radon; }
23  void set_radon_long_term(sensor::Sensor *radon_long_term) { radon_long_term_sensor_ = radon_long_term; }
24  void set_co2(sensor::Sensor *co2) { co2_sensor_ = co2; }
25 
26  protected:
27  bool is_valid_radon_value_(uint16_t radon);
28  bool is_valid_co2_value_(uint16_t co2);
29 
30  void read_sensors(uint8_t *raw_value, uint16_t value_len) override;
31 
35 
37  uint8_t version;
38  uint8_t humidity;
39  uint8_t ambientLight;
40  uint8_t unused01;
41  uint16_t radon;
42  uint16_t radon_lt;
43  uint16_t temperature;
44  uint16_t pressure;
45  uint16_t co2;
46  uint16_t voc;
47  };
48 };
49 
50 } // namespace airthings_wave_plus
51 } // namespace esphome
52 
53 #endif // USE_ESP32
void read_sensors(uint8_t *raw_value, uint16_t value_len) override
void set_radon_long_term(sensor::Sensor *radon_long_term)
This is a workaround until we can figure out a way to get the tflite-micro idf component code availab...
Definition: a01nyub.cpp:7
Base-class for all sensors.
Definition: sensor.h:57