Automation with time condition always runs

Hello,

I’ve created a really simple automation in HA core 0.118.5 which should turn on a light if the current time is before 08:00:00. I’ve created the automation via the gui editor.

When I trigger the automation manually by pressing the “trigger” button on the automation page after 08:00:00 the action still gets triggered.

If I press the button at 13:21:00 for example, the lights turns on. But it should stay off, because it’s after 08:00:00 and not before.

This is the resulting YAML from automatations.yaml:

- id: '160932516564'
  alias: timetest
  description: ''
  trigger: []
  condition:
  - condition: time
    before: 08:00:00
  action:
  - type: turn_on
    device_id: 6a258c2847bb65646848
    entity_id: light.livingroom
    domain: light
    brightness_pct: 5
  mode: single

I just don’t know why the automation is always running the action, even if it’s after 08:00:00. Maybe its because I manually trigger the automation?

Thanks in advance for your help!

When you trigger an automation manually, all conditions are ignored and it goes straight to the action part.

There is an option to manually trigger an automation in the developer tools services menu that forces the service to not ignore conditions.

1 Like

Thank you two so much! That solved that problem. When I trigger the automation from the developer tools witht the “skip_condition” parameter set to false it seems to work.

1 Like

I did not know that !

Saves sticking the spare input boolean in as a trigger and then having to remove it later