home-assistant / frontend

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

Color Temperature Selector - inverted slider #21002

Closed SirYasko closed 1 month ago

SirYasko commented 5 months ago

Checklist

Describe the issue you are experiencing

I've created blueprint with 2 inputs - color_temp selectors. The first one works fine, but I wanted to swap colors on the frontend (warmer on the left) , so I swapped the min and max values. The colors have changed correctly but the default value and slider do not work

image

` blueprint: name: SirYasko's Test description: "selector color_temp" domain: automation author: SirYasko

input:
i__color_1: name: Slider works - default 300 description: Can move slider default: 300 selector: color_temp: min: 153 max: 500 unit: "mired"

i__color_2:
  name: Slider does not work - default 300
  description: Can not move slider, default value not set
  default: 300
  selector:
    color_temp:
      min: 500
      max: 153
      unit: "mired" 

mode: restart max_exceeded: silent

trigger:

action: `

Describe the behavior you expected

It should work like the first selector, but with the colors swapped - looks OK

Steps to reproduce the issue

  1. Create blueprint
  2. Add input selector color_temp:
  3. set min: 500 and max: 153
  4. set default: 300
  5. try to move slider on frontend

What version of Home Assistant Core has the issue?

core-2024.5.5

What was the last working version of Home Assistant Core?

No response

In which browser are you experiencing the issue with?

Google Chrome 125.0.6422.78

Which operating system are you using to run this browser?

Windows 10 Pro x64

State of relevant entities

No response

Problem-relevant frontend configuration

No response

Javascript errors shown in your browser console/inspector

No response

Additional information

No response

karwosts commented 5 months ago

The max cannot be less than the min. If you want to invert the direction of the color gradient, I think the only option may be to use unit: kelvin

SirYasko commented 4 months ago

I understood, but why? After all, it inverts the gradient so why wouldn't it work - it's just a number range and a value.

github-actions[bot] commented 1 month 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.