ESPHome
2026.11.0b6
Loading...
Searching...
No Matches
esphome
components
sdp3x
sdp3x.h
Go to the documentation of this file.
1
#pragma once
2
3
#include "
esphome/components/sensor/sensor.h
"
4
#include "
esphome/components/sensirion_common/i2c_sensirion.h
"
5
6
namespace
esphome::sdp3x
{
7
8
class
SDP3XComponent
final :
public
PollingComponent
,
9
public
sensirion_common::SensirionI2CDevice
,
10
public
sensor::Sensor
{
11
public
:
13
explicit
SDP3XComponent
(uint16_t start_command) :
start_command_
(start_command) {}
14
15
void
update
()
override
;
16
void
setup
()
override
;
17
void
dump_config
()
override
;
18
19
protected
:
20
uint16_t
start_command_
;
21
uint16_t
product_id_
{0};
22
};
23
24
}
// namespace esphome::sdp3x
esphome::PollingComponent
This class simplifies creating components that periodically check a state.
Definition
component.h:532
esphome::sdp3x::SDP3XComponent
Definition
sdp3x.h:10
esphome::sdp3x::SDP3XComponent::setup
void setup() override
Definition
sdp3x.cpp:38
esphome::sdp3x::SDP3XComponent::SDP3XComponent
SDP3XComponent(uint16_t start_command)
start_command selects the measurement mode (differential pressure or mass flow).
Definition
sdp3x.h:13
esphome::sdp3x::SDP3XComponent::update
void update() override
Definition
sdp3x.cpp:64
esphome::sdp3x::SDP3XComponent::start_command_
uint16_t start_command_
Definition
sdp3x.h:20
esphome::sdp3x::SDP3XComponent::dump_config
void dump_config() override
Definition
sdp3x.cpp:55
esphome::sdp3x::SDP3XComponent::product_id_
uint16_t product_id_
Definition
sdp3x.h:21
esphome::sensirion_common::SensirionI2CDevice
Definition
i2c_sensirion.h:22
esphome::sensor::Sensor
Base-class for all sensors.
Definition
sensor.h:48
i2c_sensirion.h
esphome::sdp3x
Definition
sdp3x.cpp:4
sensor.h
Generated by
1.12.0