Simple automation NEVER triggers

Guys, I made a very simple automation with the UI and it never triggers. I had a look at it for a 1000 times and I can’t see why its not working. I have other similar ones with no issue and this one just fails…

I like to restart HA every day at 09:00 hrs:

alias: 'HA Restart every day at 09:00'
description: ''
trigger:
  - at: '09:00:00'
    platform: time
condition: []
action:
  - service: homeassistant.restart
mode: single

I made this with the UI, I didn’t do any YAMling. It doesn’t ever trigger. Does anyone sees what I am missing?

At first glance it looks good so let’s take care of the basics first: is the automation enabled?

Go to Configuration > Automations, find your restart automation and ensure the toggle button next to its name is enabled.

If it is enabled, check the Last Triggered time (should be never it truly never triggered).

Yes Its enabled. And if I execute it manually it does what it suppose to do :smiley:

Somehow it fails to trigger automatically. I also reloaded and restarted a dozen times…

Ok, good. Manually triggering it skips the automation’s trigger and simply executes the action. Therefore your test confirmed the action works and the fault lies with the Time Trigger.

However, I don’t see anything obviously wrong with the Time Trigger’s syntax.

Guess would be that the system clock is wrong if everything else is in order.

Thanks for confirming my issue. Perhaps the timestamp of the trigger doesn’t come right

Yes that could be and its complicated. However I have similar automations (snapshot and cleanup) on a similar automation without an issue.

wrt clock. I work from Brasil but my Redberry is in Portugal. That is sometimes confusing. Nevertheless even if the time of triggering is wrong it still should trigger but nada!

A few minutes ago, I created this automation (with the Automation Editor) and it restarted my test server at 17:15:00.

alias: New Automation test
description: ''
trigger:
  - platform: time
    at: '17:15:00'
condition: []
action:
  - service: homeassistant.restart
    data: {}
mode: single

Something isn’t quite right with your system. I would go with mf_social’s suggestion to check the system clock.

Go to the Template Editor and paste this:

{{ now() }}

Confirm the time it reports is correct.

It reports the correct time in portugal, the location of my hub

Anyway the syntax is correct. That helps already. Now to think through what’s happening with the time…

Not sure if it matters, but the only thing that stands out is that mine doesn’t have any quotes around the time.

  alias: Restart Home Assistant Nightly @3:45 AM - Every Sun
  description: ''
  trigger:
  - at: 03:45:00
    platform: time
  condition:
  - condition: time
    weekday:
    - sun
  action:
  - service: homeassistant.restart
  mode: single
1 Like

i will try that although i made it with the UI…

Mine was made with the UI as well…

I took the quotes away and it worked :no_mouth:. Now this: if I YAML it and save it it works. I opened it with the UI and the quotes are back…

Curious where that leaves me now?

So saving it in YAML mode without quotes and don’t touch it again seems to work. A bit feeble but it works…

thanks all. Happy New Year!

Which version are you using?

The test I performed was with 2020.12.2 (automation created via UI and it triggers at the specified time, quoted time and all).

I am on 2020.12.2 too. I still don’t trust it. Did some tests with time settings which did work. Now I have set it at my required time at 08:30 in the morning. So let’s see…

Here’s the deal:

We both use the same version and tested the same automation, created the same way with the Automation Editor, and with a quoted time value. Yet it fails for you and succeeds for me.

Given that I do not have to remove the quotes to make it work, suggests something else is amiss with your system’s configuration.

1 Like

I take that. But what is the issue? Other time triggered automations don’t give problems…

All the more reason to believe the suggested Solution is more of a Band-Aid than an actual solution. It has always been permitted to enter the time with or without quotes.

There’s something else going on here but the relevant clues are missing.

I guess so. I had a fail again. I deleted the old one considering it was ‘haunted’ but the new one I made did trigger either…

So what could be the missing clues :face_with_monocle:?