1
0
mirror of https://github.com/esphome/esphome.git synced 2025-09-05 21:02:20 +01:00
Files
esphome/esphome/components/gl_r01_i2c/gl_r01_i2c.h
2025-07-09 10:50:45 +12:00

23 lines
487 B
C++

#pragma once
#include "esphome/core/component.h"
#include "esphome/components/sensor/sensor.h"
#include "esphome/components/i2c/i2c.h"
namespace esphome {
namespace gl_r01_i2c {
class GLR01I2CComponent : public sensor::Sensor, public i2c::I2CDevice, public PollingComponent {
public:
void setup() override;
void dump_config() override;
void update() override;
protected:
void read_distance_();
uint16_t version_{0};
};
} // namespace gl_r01_i2c
} // namespace esphome