ESPHome
2026.11.0b6
Loading...
Searching...
No Matches
esphome
components
sm300d2
sm300d2.h
Go to the documentation of this file.
1
#pragma once
2
3
#include "
esphome/core/component.h
"
4
#include "
esphome/components/sensor/sensor.h
"
5
#include "
esphome/components/uart/uart.h
"
6
7
namespace
esphome::sm300d2
{
8
9
class
SM300D2Sensor
final :
public
PollingComponent
,
public
uart::UARTDevice
{
10
SUB_SENSOR(co2)
11
SUB_SENSOR(formaldehyde)
12
SUB_SENSOR(tvoc)
13
SUB_SENSOR(pm_2_5)
14
SUB_SENSOR(pm_10_0)
15
SUB_SENSOR(
temperature
)
16
SUB_SENSOR(humidity)
17
18
public
:
19
void
update
()
override
;
20
void
dump_config()
override
;
21
};
22
23
}
// namespace esphome::sm300d2
esphome::PollingComponent
This class simplifies creating components that periodically check a state.
Definition
component.h:532
esphome::PollingComponent::update
virtual void update()=0
esphome::sm300d2::SM300D2Sensor
Definition
sm300d2.h:9
esphome::uart::UARTDevice
Definition
uart.h:15
component.h
esphome::sm300d2
Definition
sm300d2.cpp:5
sensor.h
temperature
uint16_t temperature
Definition
sun_gtil2.cpp:12
uart.h
Generated by
1.12.0