ESPHome 2026.11.0b6
Loading...
Searching...
No Matches
sfa40.h
Go to the documentation of this file.
1#pragma once
2
6
7namespace esphome::sfa40 {
8
9// SFA40 Datasheet: https://sensirion.com/media/documents/5B06EDD9/69F84BD8/Sensirion_Datasheet_SFA40.pdf
10
12 SUB_SENSOR(formaldehyde)
13 SUB_SENSOR(temperature)
14 SUB_SENSOR(humidity)
15
16 public:
17 void setup() override;
18 void dump_config() override;
19 void update() override;
20
21 void set_wait_for_ready(bool wait_for_ready) { this->wait_for_ready_ = wait_for_ready; }
22
23 protected:
24 enum ProtocolVersion : uint8_t {
28 };
29 bool detect_protocol_();
31 char device_marking_[11]{};
32 bool initialized_{false};
33 bool wait_for_ready_{true};
34 uint64_t serial_number_{0};
35};
36
37} // namespace esphome::sfa40
virtual void setup()
Where the component's initialization should happen.
Definition component.cpp:84
This class simplifies creating components that periodically check a state.
Definition component.h:532
ProtocolVersion protocol_version_
Definition sfa40.h:30
uint16_t temperature
Definition sun_gtil2.cpp:12