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
Input select - Select next getting stuck with duplicate items #64161
Comments
input_select documentation |
Hey there @home-assistant/core, mind taking a look at this issue as it has been labeled with an integration ( |
Until the bug is fixed, you can mitigate the problem by consolidating RGB into a single input_select:
light_color:
options:
- 255,239,72
- 255,96,71
- 255,71,129
- 239,70,255
- 119,70,255
- 70,144,255
- 0,255,255
- 0,255,106
- 0,255,0
- 255,174,0 - id: '1642148439200'
alias: Lights Control (Automation)
description: ''
trigger:
- platform: state
entity_id: sensor.button_click
to: double
id: double
condition: []
action:
- service: light.turn_on
target:
entity_id: light.lamp
data:
rgb_color: "{{ states('input_select.light_color').split(',') }}"
- service: input_select.select_next
target:
entity_id: input_select.light_color
mode: single That should work for now, provided each option's value is unique (otherwise it will encounter the bug again). |
@tdejneka Thank you for the workaround :) I actually did something similar, but with an |
The problem is that A problem with the latter is that it makes restoring the state ambiguous. |
It's not really feasible to support duplicated options, selecting an option would still be ambiguous because that's done by selecting a value, not an index. The linked PR hence deprecates creating or updating input_select with duplicated options. |
Makes sense! Thank you 🙂 |
The problem
Originally posted on forum: Input select - Select next getting stuck while cycling through options
After asking on the Discord server, moderator RobC pointed out that this could be an issue:
It appears that if an
input_select
has items that are not unique in the list, it would revert to the first occurrence of that item and never update beyond it.What version of Home Assistant Core has the issue?
core-2021.12.9
What was the last working version of Home Assistant Core?
No response
What type of installation are you running?
Home Assistant Core
Integration causing the issue
Helper - Input Select
Link to integration documentation on our website
https://www.home-assistant.io/integrations/input_select/
Example YAML snippet
Anything in the logs that might be useful for us?
Additional information
Example Automation:
The text was updated successfully, but these errors were encountered: