home-assistant / home-assistant/iOS
Values in complications not displayed correctly
- Dominant language
- Swift
- Stars
- 2.4k
- Forks
- 520
- Avg merge
- 7h 27m
- Merged PRs (30d)
- 264
Description
**iOS device model, version and app version**
Model Name: iPhone 12 Pro
Software Version: 17.1
App version: 2023.7 (2023.471)
**Home Assistant Core Version**
2023.10.5
**Describe the bug**
Some values in Watch complications are not displayed correctly. Seems to be related to rounding/epsilon error, but there is no workaround.
Using round or format functions will not do anything, because the value will always be converted to float.
Example values and how they are displayed:
9.8 -> 9.8000…1
8.8 -> 8.8000…1
9.3 -> 9.3000…1
9.2 -> 9.1999…9
Or use any sensor that outputs a value like above
**To Reproduce**
1) Go to Apple Watch settings in Home Assistant iOS App
2) Add a new complication (for example image circular)
3) select a template (for example open gauge text)
4) copy/paste in any field:
{% set value = 9.8 %}
{{ value }}
5) the output will show as 9.8000000…1
Or try with format:
{% set value = 9.8 %}
{{ '%.2f' | format(value) }}
Outputs same as 5)
**Expected behavior**
Rounding error should not be visible or the use of format function should be possible.
**Screenshots**

Contributor guide
Assessment
This issue has not been assessed yet.