I’m trying to tie an input_select to an automation rule to allow starting or changing a Sonos playlist. Based on the selection from the input_select I would like to have a different media_content_id sent but I’m not sure of the format required (or if possible).
Curent:
alias: Playlist Selection
trigger:
platform: state
entity_id: ‘input_select.sonosplaylist’
to: “Today’s Biggest Hits”
action:
I have the same need. By now I’ve solved this by creating 1 script per playlist and adding it to each group. Very confusing and complicated to maintain.
Maybe we can open a feature request to have something like a switch.
Yeah, it is something that shocks a lot of people moving from other coding languages, as it almost seems like it should be a given that all languages use switch/case, and this has been debated back and forth in forums from one side of the internet to the other, but apparently the creators of Python believe in some purity aspects of their vision of the perfect coding language and the switch/case concept is not in their playbook.