Time trigger not working on Automation

Prob asked a million times, but has anyone seeing issues latetly with trigger Time?
Have a automation like this:

- id: '1596097280124'
  alias: Turn ON Front Bottom Light at Night
  description: ''
  trigger:
  - at: '21:00:00'
    platform: time
  condition: []
  action:
  - data: {}
    entity_id: light.front_bottom_light
    service: light.turn_on

If I run it manually with the execute button, the light turns on, but at 21:00 it never does :frowning:
I have tried to recreate this automation several times and it never triggers. Does not even show in the logbook. Any ideas?

I have other time automations that work just fine :frowning:

Thanks for the help

Very odd, nothing wrong with that automation that I can see: it exactly matches a test automation I just made with the exception of the new mode: single at the end. Wonder if it’s related to this topic?

What type of installation do you have, and what version?

I have a normal HA instalation on a VM server, running Home Assistant 0.110.7.

Humm, thats what gets me, I have a ton of other time automations that run fine, now this one is new, not sure if I’ve created any time ones after the last update…
On the other topic you sent, how do I check the sensor they are mentioning?

Thanks

sensor.time is not directly related to your issue, and is part of the time_date integration (docs). You don’t need it to do time-based automations, but it’s suspicious that both issues are being reported together.

However, if you’re on 0.110.7, it’s not as a result of a recent change…

Anything in the logs? (under Developer Tools on your version, I think).

Nope, thats the thing… 0 information on the logs :frowning:
Just tried to change the time to 10:08:00 for the test… looking at logs and Logbook… nothing :frowning:

Is your system time correct?

Hopefully not some sort of auto-censoring filter complaining about “front bottom” :rofl:

EDIT: it isn’t. I’ve just created this in the UI editor (usually don’t use that) and it switched on exactly as expected:

- id: '1596187874168'
  alias: Turn ON Front Bottom Light at Night
  description: ''
  trigger:
  - at: '10:32:00'
    platform: time
  condition: []
  action:
  - data: {}
    entity_id: light.hall_table_light
    service: light.turn_on
  mode: single

image

I wonder if there’s an issue with a preceding automation that’s messing up the YAML? Can you post this and the previous automation from your automations.yaml?

The system time is correct,

$ date
Fri Jul 31 10:37:38 IST 2020

But while looking at the logbook noticed this…

image

:joy:

Heres the previous and after

- id: '1595603598679'
  alias: Turn OFF Front Bottom Light in the Morning
  description: ''
  trigger:
  - event: sunrise
    platform: sun
  condition:
  - condition: device
    device_id: 
    domain: light
    entity_id: light.front_bottom_light
    type: is_on
  action:
  - data: {}
    entity_id: light.front_bottom_light
    service: light.turn_off
- id: '1596097280124'
  alias: Turn ON Front Bottom Light at Night
  description: ''
  trigger:
  - at: '10:36:00'
    platform: time
  condition: []
  action:
  - data: {}
    entity_id: light.front_bottom_light
    service: light.turn_on
- id: '1596097640730'
  alias: Turn OFF Pump NO One Home
  description: ''
  trigger:
  - entity_id: input_select.house_occupancy
    platform: state
    to: Away
  condition: []
  action:
  - data: {}
    entity_id: switch.water_pump
    service: switch.turn_off

Looks good there. Perhaps a timezone issue based on that prior screenshot, although that may be expected UTC in logs? Does it switch the light an hour later than expected? What do you have for HA timezone?

image

Yeah the timezone is UTC

image

And… holy smokes…

image

System time: 11:03… automation time: 10:03 :confused:

So its indeed a timezone issue… how do I fix this?

Configuration / General. Odd that you “have other time automations that work just fine”.

Wondering if its because all the time ones we’re created a long time ago? Not sure actually… :confused:

What do you get in the template editor if you enter this:

{{ utcnow() }} {{ utcnow().tzinfo }}
{{ now() }} {{ now().tzinfo }}
{{ now().astimezone() }} {{ now().astimezone().tzinfo }}

I have been getting odd stuff going with time since upgrade to 0.113.x. Twice now the time has gotten stuck, causing automations based on sensor.time to not work at all.

See topic linked by @troon further up in thread on 31 July - Sensor.time problem

Thanks, but a time trigger is different from a state trigger using sensor.time. Of course there could be some underlying issue that affects both, but just wanted to be clear.

Hello,

I have smae issue and try to make a simple holiday light automation and when i use a time to switch on it will not work. My code is as follows:

alias: vakantieverlichting aan
 description: ''
 trigger:
 - platform: time
   at: input_datetime.tijd_vakantieverlichting_inschakelen
 condition:
 - condition: and
   conditions:
   - condition: state
     entity_id: input_boolean.vakantie
     state: 'on'
 action:
 - service: light.turn_on
   data: {}
   entity_id: light.holyday_lights
 mode: single

When i use an other trigger like a switch it works. Looks like something simple but i dont know :frowning:
I hope someone can help me further with this.

I dont have failure in logbook or so,

Thanks in advance

Regards

Wilfried

Hello,

It is solved.

Wilfried

Hi, same there.
How have you solved it?

In my case it was the timezone it was wrongly setup so all the automations were indeed working but with an hour delay. Not sure if its the same case as you.