Trigger time not working

I have the following 2 automations, but they refuse at the trigger I set up, at 21:00:00.
If I run them manually they work just fine.

What did I do wrong?
Thank you in advance! <3


- id: "Lock frontdoor at 21:00:00"
  alias: "Lock frontdoor at 21:00:00"
  description: ''
  trigger:
  - platform: time
    at: '21:00:00'
  condition:
  - condition: state
    entity_id: binary_sensor.door_frontdoor_contact
    state: 'false'
  - condition: state
    entity_id: lock.lock_frontdoor
    state: unlocked
  action:
  - device_id: 1b6aa0ee39f5eb4bfd094de81c40cf22
    domain: lock
    entity_id: lock.lock_frontdoor
    type: lock

- id: "Lock backdoor at 21:00:00"
  alias: "Lock backdoor at 21:00:00"
  description: ''
  trigger:
  - platform: time
    at: '21:00:00'
  condition:
  - condition: state
    entity_id: binary_sensor.door_backdoor_contact
    state: 'false'
  - condition: state
    entity_id: lock.lock_backdoor
    state: unlocked
  action:
  - device_id: 226686db690adffbbc2305ee1577dc77
    domain: lock
    entity_id: lock.lock_backdoor
    type: lock

Remove the quotes around false change false to ”off” wrapped in quotes

It just doesn’t trigger. The automation works if I run it manually?
How come changing false to “off” would somehow trigger it? Just trying to understand :slight_smile:

The condition is failing, it’s triggering but your condition is impossible to pass because binary sensors have a state of on or off, not true/false

I shouldn’t have doubted you, it works, thank you!!

- id: "Turn on hallway lights when doors are opened one hour before sunset"
  alias: "Turn on hallway lights when doors are opened one hour before sunset"
  description: ""
  trigger:
  - platform: state
    entity_id: binary_sensor.door_living_contact
    attribute: contact
    from: true
    to: false
  - platform: state
    entity_id: lock.lock_frontdoor
    attribute: lock_state
    from: locked
    to: unlocked
  - platform: state
    entity_id: binary_sensor.door_frontdoor_contact
    attribute: contact
    from: true
    to: false

Follow-up question, these should be changed to "on"/"off" as well, in stead of true/false?

Yep true false isn’t really used much in ha. Make sure you quote them too

1 Like