diff --git a/esphome/components/ld2450/ld2450.cpp b/esphome/components/ld2450/ld2450.cpp index 58d469b2a7..512683bbce 100644 --- a/esphome/components/ld2450/ld2450.cpp +++ b/esphome/components/ld2450/ld2450.cpp @@ -451,7 +451,7 @@ void LD2450Component::handle_periodic_data_() { int16_t ty = 0; int16_t td = 0; int16_t ts = 0; - int16_t angle = 0; + float angle = 0; uint8_t index = 0; Direction direction{DIRECTION_UNDEFINED}; bool is_moving = false; diff --git a/esphome/components/ld2450/sensor.py b/esphome/components/ld2450/sensor.py index 3dee8bf470..ce58cedf11 100644 --- a/esphome/components/ld2450/sensor.py +++ b/esphome/components/ld2450/sensor.py @@ -143,6 +143,7 @@ CONFIG_SCHEMA = CONFIG_SCHEMA.extend( ], icon=ICON_FORMAT_TEXT_ROTATION_ANGLE_UP, unit_of_measurement=UNIT_DEGREES, + accuracy_decimals=1, ), cv.Optional(CONF_DISTANCE): sensor.sensor_schema( device_class=DEVICE_CLASS_DISTANCE,