Automatically populate dropdown options from effects / entity attribute lists? #137
NewsGuyTor
started this conversation in
General
Replies: 1 comment
-
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment

Uh oh!
There was an error while loading. Please reload this page.
-
I am trying to create a dropdown menu to control the effect for each one of my RGB lights. My light entities has a attribute called effect_list which contains all the scene names. I was hoping I could just point the dropdown's options to this attribute, but it seems I have to manually define each effect as a separate option in the YAML. Is this accurate?
For a light with 20+ effects, in that case the card code gets very long and repetitive. It also means if I add a new scene in the Nanoleaf app for example, I have to remember to go back and update my Lovelace YAML.
It would be cool if the dropdown feature could automatically populate its options from an entity attribute that contains a list. For instance, you could point the options field to state_attr('light.my_light', 'effect_list') and the card would create an option for each item in that list.
Beta Was this translation helpful? Give feedback.
All reactions