ESPHome 2026.11.0b6
Loading...
Searching...
No Matches
airthings_wave_plus.h
Go to the documentation of this file.
1#pragma once
2
3#ifdef USE_ESP32
4
7
9
11
12enum WaveDeviceType : uint8_t { WAVE_PLUS = 0, WAVE_GEN2 = 1 };
13
14static const char *const SERVICE_UUID = "b42e1c08-ade7-11e4-89d3-123b93f75cba";
15static const char *const CHARACTERISTIC_UUID = "b42e2a68-ade7-11e4-89d3-123b93f75cba";
16static const char *const ACCESS_CONTROL_POINT_CHARACTERISTIC_UUID = "b42e2d06-ade7-11e4-89d3-123b93f75cba";
17
18static const char *const SERVICE_UUID_WAVE_RADON_GEN2 = "b42e4a8e-ade7-11e4-89d3-123b93f75cba";
19static const char *const CHARACTERISTIC_UUID_WAVE_RADON_GEN2 = "b42e4dcc-ade7-11e4-89d3-123b93f75cba";
20static const char *const ACCESS_CONTROL_POINT_CHARACTERISTIC_UUID_WAVE_RADON_GEN2 =
21 "b42e50d8-ade7-11e4-89d3-123b93f75cba";
22
24 SUB_SENSOR(radon)
25 SUB_SENSOR(radon_long_term)
26 SUB_SENSOR(co2)
27 SUB_SENSOR(illuminance)
28
29 public:
30 void setup() override;
31
32 void dump_config() override;
33
34 void set_device_type(WaveDeviceType wave_device_type) { wave_device_type_ = wave_device_type; }
35
36 protected:
37 bool is_valid_radon_value_(uint16_t radon);
38 bool is_valid_co2_value_(uint16_t co2);
39
40 void read_sensors(uint8_t *raw_value, uint16_t value_len) override;
42
44 uint8_t version;
45 uint8_t humidity;
46 uint8_t ambientLight;
47 uint8_t unused01;
48 uint16_t radon;
49 uint16_t radon_lt;
50 uint16_t temperature;
51 uint16_t pressure;
52 uint16_t co2;
53 uint16_t voc;
54 };
55};
56
57} // namespace esphome::airthings_wave_plus
58
59#endif // USE_ESP32
virtual void setup()
Where the component's initialization should happen.
Definition component.cpp:84
SUB_SENSOR(temperature) SUB_SENSOR(humidity) SUB_SENSOR(pressure) SUB_SENSOR(tvoc) void set_battery_voltage(sensor
void read_sensors(uint8_t *raw_value, uint16_t value_len) override