ESPHome 2026.11.0-dev
Loading...
Searching...
No Matches
sensor.h
Go to the documentation of this file.
1#pragma once
2
4
5#include "../duco.h"
6
7namespace esphome::duco {
8
20
21class DucoSensor : public DucoDevice, public sensor::Sensor {
22 public:
24 DucoSensor(DucoReading reading, uint8_t argument) : reading_(reading), argument_(argument) {}
25
26 void update() override;
27 void receive_response(const DucoMessage &message) override;
28
29 protected:
31 uint8_t argument_;
32};
33
34} // namespace esphome::duco
Every entity polls the box; deriving from PollingComponent shares its vtable.
Definition duco.h:81
void receive_response(const DucoMessage &message) override
Definition sensor.cpp:59
DucoSensor(DucoReading reading, uint8_t argument)
argument is the node address, or the parameter number for a box parameter.
Definition sensor.h:24
DucoReading reading_
Definition sensor.h:30
void update() override
Definition sensor.cpp:45
Base-class for all sensors.
Definition sensor.h:47
const LogString * message
Definition component.cpp:35
DucoReading
What a sensor reads; the request and where the value is in the answer are in READINGS in sensor....
Definition sensor.h:10
A received message; data points into the receive buffer and is valid only during the callback.
Definition duco.h:22