ESPHome 2026.12.0-dev
Loading...
Searching...
No Matches
ads131m0x_sensor.h
Go to the documentation of this file.
1#pragma once
2
3#ifdef USE_ESP32
4
5#include <cstdint>
6
10
11#include "../ads131m0x.h"
12
13namespace esphome::ads131m0x {
14
19
20class ADS131M0xSensor final : public PollingComponent, public sensor::Sensor, public Parented<ADS131M0x> {
21 public:
22 void update() override;
23 void dump_config() override;
24
25 void set_channel(uint8_t channel) { this->channel_ = channel; }
27
28 protected:
29 uint8_t channel_{0};
31};
32
33} // namespace esphome::ads131m0x
34
35#endif // USE_ESP32
Helper class to easily give an object a parent of type T.
Definition helpers.h:2358
This class simplifies creating components that periodically check a state.
Definition component.h:541
void set_type(ADS131M0xSensorType type)
Base-class for all sensors.
Definition sensor.h:48
uint8_t type