Skip to content

[Bug]: Broken decimal precision in sensor states #1293

Open
@szymucha94

Description

@szymucha94

What happened?

I'm using 4 x86 tablets acting as BLE relays. They don't modify packets - just putting exact string from hcidump and sending it to HA restapi.
Some time ago (not sure when - can't state exact versions) battery % decimal precision broke. See attached picture.
Not sure if relaying ble packets makes any difference here, but this issue is not exclusive to xiaomi devices.
Changing precision in HA sensor information doesn't fix this.
Currently using v12.7.2 as v12.8.0 doesn't want to start on HA core v2023.11.2.

Example curl call:
curl -s -o /dev/null -X POST -H "Authorization: Bearer XXX"
-H "Content-Type: application/json"
-d '{"packet": "'"$hci_packet"'"}'
http://XXX:8123/api/services/ble_monitor/parse_data

412

Sensor type

No response

Relevant log output

No response

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions