ESPHome  2024.10.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  void set_illuminance(sensor::Sensor *illuminance) { illuminance_sensor_ = illuminance; }
26 
27  protected:
28  bool is_valid_radon_value_(uint16_t radon);
29  bool is_valid_co2_value_(uint16_t co2);
30 
31  void read_sensors(uint8_t *raw_value, uint16_t value_len) override;
32 
37 
39  uint8_t version;
40  uint8_t humidity;
41  uint8_t ambientLight;
42  uint8_t unused01;
43  uint16_t radon;
44  uint16_t radon_lt;
45  uint16_t temperature;
46  uint16_t pressure;
47  uint16_t co2;
48  uint16_t voc;
49  };
50 };
51 
52 } // namespace airthings_wave_plus
53 } // namespace esphome
54 
55 #endif // USE_ESP32
void set_illuminance(sensor::Sensor *illuminance)
void read_sensors(uint8_t *raw_value, uint16_t value_len) override
void set_radon_long_term(sensor::Sensor *radon_long_term)
Implementation of SPI Controller mode.
Definition: a01nyub.cpp:7
Base-class for all sensors.
Definition: sensor.h:57