Quantcast
Channel: Configuration - Home Assistant Community
Viewing all articles
Browse latest Browse all 95419

Multiple if else's in automation or another way?

$
0
0

@Matt_Barnes wrote:

Just starting to get my head round automations and I have one that at the press of a button IF my sonos is paused, it plays, and if it plays it pauses which is great.

Next step is to emply another button on my switch to scroll through sources, so something like this.

if playlist 1 is playing and button is pressed play playlist 2.
if playlist 2 is playing and button is pressed, play playlist 3
if playlist 3 is playing and button is pressed, play playlist 4

I have about 10 playlists, and the thought of a massive if else blew my mind, so I was wondering if that was how it needed to be done, or should I be thinking scripts?

How would you start solving for something like this?

Thanks!

Posts: 2

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 95419

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>