Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Display Precision not Updating in Chip Cards #1313

Open
IMakeTP opened this issue Jun 4, 2023 · 3 comments
Open

Display Precision not Updating in Chip Cards #1313

IMakeTP opened this issue Jun 4, 2023 · 3 comments
Labels

Comments

@IMakeTP
Copy link

IMakeTP commented Jun 4, 2023

Describe the bug
Similar to the issue with Mushroom, Minimalist chip cards are not updating with precision adjustments made within HA UI.
home-assistant/frontend#15582

To Reproduce

yaml code:
type: 'custom:button-card'
template: chip_icon_label
label: >
[[[
return states['sensor.meater_probe_ambient'].state + "°F / " + states['sensor.meater_probe_internal'].state + "°F"
]]]
icon: mdi:grill
color: "var(--google-red)"

image

Expected behavior
Temperature display should be with zero significant digits

Screenshots
image

Additional context
Add any other context about the problem here.

@basbruss
Copy link
Collaborator

basbruss commented Jun 7, 2023

@IMakeTP This is more of a bug added by HA to custom:button-card.

The next release will handle display precision for cards that work with the translation engine. #1314
Note: This does not include all chips and custom templates like you built in the example.

@andyblac
Copy link

how would use it for example above

label: '[[[ return states["sensor.front_garden_motion_sensor_temperature"].state + "°C" ]]]'

@basbruss
Copy link
Collaborator

basbruss commented Jun 26, 2023

how would use it for example above

label: '[[[ return states["sensor.front_garden_motion_sensor_temperature"].state + "°C" ]]]'

It would not work without globally setting the entity.
So the minimal things you need to have in your card/chip is:

template:
  - ulm_translation_engine
entity: sensor.front_garden_motion_sensor_temperature
label: "[[[ return variables.ulm_translation_state_unit ]]]"

display precision for cards that work with the translation engine

You will need to have the label rendered by the translation engine, which requires the globally set entity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants