Create ultrasonic_sensor.h

This commit is contained in:
Masterz69 2024-04-02 18:08:16 +03:00 committed by GitHub
parent 5821037ed2
commit e24c2332d6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View 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