Automation works only once

I have an automation that looks like it only works once.
The automation should turn on one light at 20:00 every day, as long as someone is home. Turning the light on manually in HA works properly.
The first time, it turns on the light just fine, everything works as it should. The next day, it does not turn on the light.
When I check the log, it says that it has been triggered and that it has run all the way through. Everything looks OK.

The automation is terribly simple

alias: Paviljong - on
description: ''
trigger:
  - platform: time
    at: '20:00:00'
condition:
  - condition: state
    entity_id: group.familien
    state: home
action:
  - type: turn_on
    device_id: ca481ee412028d882f9a52db180fef2a
    entity_id: light.lys_paviljong
    domain: light
    brightness_pct: 82
mode: single

If I edit something on the automation (eg change the brightness), it works once again - but not the next day.
I have tried to delete and recreate it, without any difference. Also tried to change from “device - turn on” to “call service - light turn on”. But no change.
Have also tried to remove conditioning in the automation to see if it made any change - but it behaves exactly the same.

The light is a Tuya light-string and the automation is created in the visual editor if it has any significance…

Any thoughts on what could be the reason why this is not running as it should every day?

Is it possible that when it runs the first time it believes it has done the automation and therefore it is finished and doesn’t need to run again? I’ve had similar circumstances where an automation has run and only re-runs when a fundamental change to the automation or HA restarting reset the automation. Try adding a reset action at say 2:00am to turn off the light (even if it is off) and see if that triggers the automation to run again the next day. Change the time parameters to force it to happen for testing purposes.

Good tip, but the automation runs every day. Only the light is not switched on.
When I check the debug log, it says that it has run through.

By the way, I already have automation that switches off the light a little later in the night. It always works.

Take a look at the automation traces.

Trace says that everything is OK and that the light is turned on. Nothing stops.

When I use scene, and not device → turn on, everything works fine… Don’t know why :slight_smile:

1 Like