home-assistant / frontend

:lollipop: Frontend for Home Assistant
https://demo.home-assistant.io
Other
4.05k stars 2.77k forks source link

Gauge card Define Severity behaviour #15538

Closed fredd589 closed 1 year ago

fredd589 commented 1 year ago

Checklist

Describe the issue you are experiencing

When toggling Define Severity? on a gauge card that has the severity already defined, the gauge preview goes full red, then full blue - rather than defining the severity.

Describe the behavior you expected

I expect the gauge card preview to update to show the defined severity, rather than a full red or blue bar

Steps to reproduce the issue

  1. Create a gauge card that has severity defined, and come out of the edit window.
  2. Edit the card again, and toggle ' define severity'
  3. Notice how the preview on the right does not update correctly.
  4. ...

What version of Home Assistant Core has the issue?

2023.2.5

What was the last working version of Home Assistant Core?

NA

In which browser are you experiencing the issue with?

109.0.5414.119

Which operating system are you using to run this browser?

10.13.6 (17G14042)

State of relevant entities

I am using a numeric sensor with a degree's c value

Problem-relevant frontend configuration

type: gauge
entity: sensor.water_tank_temperature
needle: true
severity:
  green: 37
  yellow: 22
  red: 0
min: 15
max: 45
name: Water heater capacity

Javascript errors shown in your browser console/inspector

None

Additional information

NA

karwosts commented 1 year ago

Seems to work as expected for me.

The first time you toggle severity from on->off, the gauge turns blue, because a gauge with no severity defined is blue.

If you toggle severity back on again, the red/yellow/green values are all 0. So I guess this is sort of undefined behavior when they all have the same value, but once you enter new severity values, it should work as expected.

If you're not satisfied with this explanation, please be a little more descriptive about what you're seeing and what's wrong, and include some screenshots at each step.

github-actions[bot] commented 1 year ago

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.