Using the 'to' Statement in automations

Hello all

I am having trouble with the ‘to:’ statement in my automations. For example I am using this automation: https://home-assistant.io/cookbook/dim_lights_when_playing_media/

It keeps triggering every minute the media_player is playing which means I effectively can not change my lights while watching films. But that isn’t the worst part. Sometimes (approximately every 20 minutes) the pause automation triggers even though the state hasn’t changed at all.

Is this working for you guys or does someone know what I’m missing?

I think the best thing to do is add in a to: 'idle' or from:'idle'.

I added a PR to update the docs.
https://github.com/home-assistant/home-assistant.github.io/pull/1993

1 Like