Good Morning, I think I´m stuck with an rather simple automation rule and I just don´t get what I´m doing wrong.
It sounds so simple: When turning on my AV Receiver, an LED stripe is supposed to turn on as well, but only when the sun has set. However, the light won´t turn on and the state of the sun was definitly below horizon.
This is the part of my config
- id: '1533666227236'
alias: led-tv-bank-on
trigger:
entity_id: media_player.yamaha_receiver
platform: state
to: 'on'
condition:
condition: state
entity_id: sun.sun
state: below_horizon
action:
service: scene.turn_on
entity_id: scene.livingroom_normal
I’m not a 100% sure but I think you require it if you have multiple triggers/conditions/actions. If you only have one, you can get away without doing it but I just like to use them in the event I add some more.
Also if that doesn’t work, the other thing you’ll have to look for is if your media_player state is “on” or if it should be “playing” instead.
It just so happens I provided an explanation just the other day :
Maybe you will find this useful as well. FWIW, I don’t think this is your problem.
I agree with @Jer78, I think this may be your problem. I’m pretty sure most media_players’ states are typically ‘playing’ when they’re “on”, although I believe some might actually set their state to ‘on’.