I’d like to create an automation where, if the (bad) song being played on the radio matches a specific string, I trigger an automation. This automation would play a different sound source for a few minutes, just long enough so I’d miss the bad song on the radio.
My question is: Where’s the best place in Home Assistant to keep a list of song title strings that I could match against? And is there a “matches string in list” function like python has which could allow me to loop through the list and check against it?
Hey @tom_l, as a follow-up question: it turns out input text helpers only store 255 characters – not enough characters! Are there any other helpers in Home Assistant that could store a longer string?
You could try the Dropdown helper. It’s designed for choice lists, but you could make every song a choice, and it looks like you can get back all the options as a list from the options attribute of the helper you create. Not sure how many entries you can have (or their length), so hopefully you don’t have a large number of songs you hate so much that you want to blot them from existence.