home-assistant / home-assistant/android

Entity State widget still sometimes ignores precision setting

Open
#4,720 5 comments 0 reactions 0 assignees View on GitHub
bug widget
Dominant language
Kotlin
Stars
3.9k
Forks
1.1k
Avg merge
1d 12h
Merged PRs (30d)
81

Description

**Home Assistant Android app version(s):** 2024.9.4-full

**Android version(s):** 14

**Device model(s):** Pixel 8 Pro

**Home Assistant version:** 2024.9.3

**Last working Home Assistant release (if known):** Unknown

**Description of problem, include YAML if issue is related to notifications:**
I previously reported https://github.com/home-assistant/android/issues/3397 which was supposedly fixed in https://github.com/home-assistant/android/pull/3625. After https://github.com/home-assistant/android/pull/3625 was merged, the problem was mostly fixed, and the entity state respects the configured display precision _most of the time_. However, sometimes, it is still showing too many digits of precision. I can't find any pattern as to when this occurs but I notice it occasionally.

In the below screenshots, I have a sensor entity configured to use 1 decimal place of precision. However, sometimes the widget shows 2 decimal places.

**Companion App Logs:**
The issue is intermittent and I haven't been able to capture logs but I can attempt to, if needed.

**Screenshot or video of problem:**
## Entity more info page:
![entity_info](https://github.com/user-attachments/assets/547e836a-fd8c-4f6e-9ae6-08d636341ab3)

## Entity State widget:
![widget](https://github.com/user-attachments/assets/521e3028-d62f-475a-b2a1-3aadd8cd4f7b)

## Entity settings:
![entity_settings](https://github.com/user-attachments/assets/d2c8c71a-b13f-422f-ae8e-bae9536b4ec5)

## Widget settings:
![widget_settings](https://github.com/user-attachments/assets/aa9d0c9a-9da5-4c73-b3f1-7dc0ba9d78c4)

**Additional information:**

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.