mirror of
https://github.com/esphome/esphome.git
synced 2024-12-24 14:34:54 +01:00
Create ultrasonic_sensor.h
This commit is contained in:
parent
5821037ed2
commit
e24c2332d6
1 changed files with 21 additions and 0 deletions
21
esphome/components/ultrasonic_uart/ultrasonic_sensor.h
Normal file
21
esphome/components/ultrasonic_uart/ultrasonic_sensor.h
Normal file
|
@ -0,0 +1,21 @@
|
|||
#pragma once
|
||||
|
||||
#include "esphome/core/component.h"
|
||||
#include "esphome/components/sensor/sensor.h"
|
||||
#include "esphome/components/uart/uart.h"
|
||||
|
||||
namespace esphome {
|
||||
namespace ultrasonic_uart {
|
||||
|
||||
class UltrasonicSensorComponent_UART : public sensor::Sensor, public PollingComponent, public uart::UARTDevice {
|
||||
public:
|
||||
void setup() override;
|
||||
void dump_config() override;
|
||||
|
||||
void update() override;
|
||||
|
||||
float get_setup_priority() const override;
|
||||
};
|
||||
|
||||
} // namespace ultrasonic_uart
|
||||
} // namespace esphome
|
Loading…
Reference in a new issue