So I have Youtube TV as my main source of TV and local channels. I’ve created a script that can turn on my AndroidTV box (Shield TV) and launch the YoutubeTV app via an intent. This is all done using the Android TV ADB integration. One thing I don’t like is that if the URL ever changes I have to go into each automation and channel the value. I was wondering if there is a way in some YAML file I could create a dictionary of strings so that all I have to do is call the specific YAML (i.e. channnels.espn or channels.abc) and that will return the correct URL for my intended channel. This way I only ever have to update one spot with the specific value.
If I can’t do this in a YAML configuration file then does this need to be done in a template?
Thanks for all the help in the future and really just starting to get going with Home-Assistant. Can’t wait to keep going once I have a lot of my configuration infrastructure built up.
I think you could also write them as a JSON in a text file and have a sensor read the JSON file.
That way you could get a sensor with attributes that is key value of channel and URL.
Since the sensor can be updated with update_entity it’s easy to update the automations.
But can’t the channel URLs be parsed automatically?