Can someone help me with stacking if( functions in an expression?
I’m trying to use an expression to change the color of text and a symbol in a piston status based on the state of a sonos player. ie. playing = green, paused = purple and stopped = red. now i’ve had some success by blindly fumbling around robbing bits and pieces from various other pistons and coming up with this
({StatusPlayer} = "playing" ? '[color-green | :fal fa-play: {StatusPlayer}]' : ({StatusPlayer} = "stopped" ? '[color-red | :fal fa-stop: {StatusPlayer}]' : ({StatusPlayer} = "paused" ? '[color-purple | :fal fa-pause: {StatusPlayer}]' : ':fal fa-question:')))
where {StatusPlayer}is a variable writen by the piston and can be playing, stopped or paused. when the player is stopped I get a play symbol and stopped in green.
Im lost now…