Simple question for you guys I think. But I have a automation where the lights dim when the TV is playing (state playing). That works fine. But now it does that when playing anything. So I want to put a condition that it does only dim the lights when Netflix or Kodi is open and playing. So trigger when playing but condition only when kodi or Netflix is open.
So the entity is media_player.philips_tv
It has a attribute source which I want to use as condition. How do I put it in the condition?
Is it something like media_player.philips_tv.attribute.source? Or am I thinking it all wrong? The states of source are easy to find. Just need to know how to look in this attribute as condition.
This should do what you want. The templating subject in the HA documentation has other helpful examples. Of course the source names need to be exact matches.
The solution above is perfectly fine, but could be rewritten the following way, which makes it a bit easier to expand on which sources should allow the automation actions to run (if you ever wanted to do that):