Update sensor.py

This commit is contained in:
Masterz69 2024-04-02 20:50:25 +03:00 committed by GitHub
parent 60359a71af
commit 1490a9fb94
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -10,8 +10,8 @@ from esphome.const import (
DEPENDENCIES = ["uart"]
ultrasonic_uart_ns = cg.esphome_ns.namespace("ultrasonic_uart")
UltrasonicSensorComponent_UART = ultrasonic_uart_ns.class_(
"UltrasonicSensorComponent_UART",
UltrasonicSensorUart = ultrasonic_uart_ns.class_(
"UltrasonicSensorUart",
sensor.Sensor,
cg.PollingComponent,
uart.UARTDevice,
@ -19,7 +19,7 @@ UltrasonicSensorComponent_UART = ultrasonic_uart_ns.class_(
CONFIG_SCHEMA = (
sensor.sensor_schema(
UltrasonicSensorComponent_UART,
UltrasonicSensorUart,
unit_of_measurement=UNIT_CENTIMETER,
icon=ICON_ARROW_EXPAND_VERTICAL,
accuracy_decimals=2,