[ld2450] preserve precision of angle (#13600)

This commit is contained in:
Cody Cutrer
2026-01-28 11:04:43 -05:00
committed by GitHub
parent 3bd6ec4ec7
commit 7385c4cf3d
2 changed files with 2 additions and 1 deletions
+1 -1
View File
@@ -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;
+1
View File
@@ -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,