#New helper + logic?

1 messages · Page 1 of 1 (latest)

shell gust
#

Not sure what would be the best approach/start reading.

  1. TV (primary)
  2. Android TV (connected to TV, secondary)

I think I want a device/template/helper that display the status of two media.players (would be good to know if secondary is sleeping). And a conditional action to turn on/off or wake/sleep depending on condition.
I'm not sure about the syntax but this would probably describe the behaviour I am after. I rather keep to yaml
What is possible? Where should I start reading?

If primary = ON
player.primary.powertoggle
player.secondary.sleep
return condition (OFF)
Else
If player.secondary.sleep then wake else powertoggle.secondary
if primary = off then powertoggle.primary
return condition (ON)
End IF

primal quarry
#

I think you're going to be better off trying to do this with a script or automation rather than trying to get a dashboard card to handle it. The only card (that I know of) that can handle templated actions is the custom:button-card. Then, the dashboard card only needs to fire the script/automation.