ESPHome
2026.11.0b6
Loading...
Searching...
No Matches
esphome
components
pmwcs3
pmwcs3.h
Go to the documentation of this file.
1
#pragma once
2
#include "
esphome/core/component.h
"
3
#include "
esphome/components/sensor/sensor.h
"
4
#include "
esphome/components/i2c/i2c.h
"
5
6
// ref:
7
// https://github.com/tinovi/i2cArduino/blob/master/i2cArduino.h
8
9
namespace
esphome::pmwcs3
{
10
11
class
PMWCS3Component
final :
public
PollingComponent
,
public
i2c::I2CDevice
{
12
SUB_SENSOR(e25)
13
SUB_SENSOR(ec)
14
SUB_SENSOR(
temperature
)
15
SUB_SENSOR(vwc)
16
17
public
:
18
void
update
()
override
;
19
void
dump_config()
override
;
20
21
void
new_i2c_address(uint8_t newaddress);
22
void
air_calibration();
23
void
water_calibration();
24
25
protected
:
26
void
read_data_
();
27
};
28
29
}
// namespace esphome::pmwcs3
esphome::PollingComponent
This class simplifies creating components that periodically check a state.
Definition
component.h:532
esphome::PollingComponent::update
virtual void update()=0
esphome::i2c::I2CDevice
This Class provides the methods to read/write bytes from/to an i2c device.
Definition
i2c.h:144
esphome::pmwcs3::PMWCS3Component
Definition
pmwcs3.h:11
esphome::pmwcs3::PMWCS3Component::read_data_
void read_data_()
Definition
pmwcs3.cpp:64
component.h
i2c.h
esphome::pmwcs3
Definition
pmwcs3.cpp:5
sensor.h
temperature
uint16_t temperature
Definition
sun_gtil2.cpp:12
Generated by
1.12.0