ESPHome 2026.11.0b6
Loading...
Searching...
No Matches
hc8.h
Go to the documentation of this file.
1#pragma once
2
6
7#include <cinttypes>
8
9namespace esphome::hc8 {
10
11class HC8Component final : public PollingComponent, public uart::UARTDevice {
12 SUB_SENSOR(co2)
13
14 public:
15 void setup() override;
16 void update() override;
17 void dump_config() override;
18
19 void calibrate(uint16_t baseline);
20
21 void set_warmup_seconds(uint32_t seconds) { warmup_seconds_ = seconds; }
22
23 protected:
25 bool warmup_complete_{false};
26};
27
28} // namespace esphome::hc8
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
uint32_t warmup_seconds_
Definition hc8.h:24
static void uint32_t