I’m working on a pantry door light with and open close sensor. I created a timer helper and have it starting and canceling with the open and close. My problem is the trigger for timer.finished is not activating when the timer finishes. Here is th automation what I’m missing,
trigger:
- platform: state
entity_id: binary_sensor.your_door_sensor_here # change this
to: 'on'
- platform: state
entity_id: binary_sensor.your_door_sensor_here # change this
to: 'off'
for:
minutes: 10
action:
- service: "light.turn_{{ trigger.to_state.state }}"
target:
entity_id: light.your_light_here # change this
mode: single
Say I want to move this over and use it on a motion detector can the minutes be reset if motion is detected again. I will try what you said but I would still love to know what I’m doing wrong. Thank You for your help.
I want to thank everyone for there help I got it to work. I need to work on my spelling and typing. I’m also going to try and not use device ids as that article pointed out.
Sometimes it takes another set of eyes to spot typos.
Please consider marking my post above with the Solution tag (unless you chose to abandon your version of the automation in favor of using tom_l’s suggestion). It will automatically place a check-mark next to the topic’s title which signals to other users that this topic has been resolved. This helps users find answers to similar questions.
After reading the article tom linked for me and seeing what he said I was able to reduce the automation to this.Mine is longer but all done in the UI no yaml editing.