Time trigger not working on Automation

Exactly the same. But just setting the timezone in settings wasn’t enough. Had to restart the server.
Now it’s solved as well

1 Like

has this officially been fixed?

I have exactly the same problem. Time zone is correct, I even changed it to another city, did not work either. dev tools now() states the correct time and I have restarted HA various times.
The holiday sensor works properly, I use it in other automations with sunrise and that works like a charm.

This is my automation. It works with sunrise, but not with time :frowning:

Any ideas?

alias: Cover Up Weekday
description: ''
trigger:
  - platform: time
    at: '8:00:00'
condition:
  - condition: state
    entity_id: binary_sensor.holiday
    state: 'off'
action:
  - device_id: 3230cfb2f23ff6ed08771ca482d95e62
    domain: cover
    entity_id: cover.covername
    type: set_position
    position: 100
mode: single

Shouldn’t be the reason, but have you tried 08:00?

Yes I did, in fact it was ‘08:00:00’ before - same result: not working

I was running HA OS in a VM in VirtualBox onDdebian. I moved the VM to a windows host (of all things) and my time issues went away.

I think it was relatve to the somfy integration. I moved to the Tahoma integration and it is working ever since. I must say it did work also with Somfy (I moved the time from 08:00:00 to 08:01:01 and it worked, but I also learned that the official Somfy integration is struggling sometimes, unless it is reloaded - I just moved to Tahoma and I also left the time-trigger at 08:01:01 and its all working ever since.

1 Like

I’ve resolved my issue by setting up the timezone correcty in the UI:
http://homeassistant:8123 → Settings → System → General

I first restored a backup I made when a clean install, and then changed the timezone as above, then configured the automation. All worked after doing that.

I know this is an old thread but I setup some new automations about 4-5 months ago and realized that none of them are triggering. Two days ago I decided to add an additional trigger of going off every X number of hours. Still nothing. My time zone is set correctly. Any other ideas?

alias: HVAC Filter Needs Cleaned - Chore
description: ""
trigger:
  - platform: time
    at: "18:00:00"
  - platform: time_pattern
    hours: "23"
condition:
  - condition: template
    value_template: "  value_template: \"{{ as_timestamp(now()) > (as_timestamp(states('input_datetime.cleaned_hvac_filter_chore')) + 15552000) }}\""
action:
  - service: input_boolean.turn_on
    data: {}
    target:
      entity_id:
        - input_boolean.hvac_filter_needs_cleaned_chore
  - service: notify.mobile_app_iphone_wf4l1910mh
    data:
      message: Clean HVAC Filter
  - service: notify.mobile_app_iphone_12
    data:
      message: HVAC Filter Needs Cleaned
mode: single

You’ll probably find errors in your logs, as that condition is nonsense. I suspect you want:

    value_template: "{{ as_timestamp(now()) > (as_timestamp(states('input_datetime.cleaned_hvac_filter_chore')) + 15552000) }}"

Your time pattern trigger will not fire every 23 hours: it will fire at 23:00 only. See the documentation.