diff --git a/esphome/components/ld2450/ld2450.cpp b/esphome/components/ld2450/ld2450.cpp index 07809023cdf..ca8d918441a 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 3dee8bf4703..ce58cedf117 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,