From 6592d831638a86c3d46d1e8f128aac7992533fde Mon Sep 17 00:00:00 2001 From: Masterz69 Date: Fri, 5 Apr 2024 20:33:26 +0300 Subject: [PATCH] Update sensor.py - device_class added --- esphome/components/ultrasonic_uart/sensor.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/esphome/components/ultrasonic_uart/sensor.py b/esphome/components/ultrasonic_uart/sensor.py index 75310e0e64..586e8699ae 100644 --- a/esphome/components/ultrasonic_uart/sensor.py +++ b/esphome/components/ultrasonic_uart/sensor.py @@ -24,7 +24,8 @@ CONFIG_SCHEMA = ( icon=ICON_ARROW_EXPAND_VERTICAL, accuracy_decimals=2, state_class=STATE_CLASS_MEASUREMENT, - ) + device_class=DEVICE_CLASS_DISTANCE, +) .extend(cv.polling_component_schema("60s")) .extend(uart.UART_DEVICE_SCHEMA) )