Hi there! I have an automation that is not working as I intended and I cannot find the reason. It’s supposed to be fired at 22.00 hours if a contact sensor is closed or between 22.00 and 12.00 if the sensor is closed, but the first part (triggering at 22.00 if the contact sensor is off) is not working. If I open and close the contact sensor, then it triggers, but not if the contact is closed before 22.00 hours.
- id: '1607801351756'
alias: Start the washer
description: ''
trigger:
- type: not_opened
platform: device
device_id: 7b7444a7b6d26221115969e4abe70e6b
entity_id: binary_sensor.washer_contact
domain: binary_sensor
condition:
- condition: time
after: '22:00'
before: '12:00'
action:
- service: switch.turn_on
data: {}
entity_id: switch.washer
mode: restart