Timer is not resetting

Hi, I have this automation, I need that a timer increase the value every time that someone enter the room.
When the automation is triggered the timer.change service is not modifying the value, please any advice?

alias: LightClothsSensorPresence
description: ""
trigger:
  - type: occupied
    platform: device
    device_id: c66e7e0b7cbc3b3dd64365c37c1f9e7d
    entity_id: b39eb59c848342d9ac733c2e610f209c
    domain: binary_sensor
condition: []
action:
  - service: timer.change
    target:
      entity_id:
        - timer.cloths
    data:
      duration: "+60"
mode: single


Just done this in the UI and I get slightly different yaml:

  - service: timer.change
    target:
      entity_id: timer.cloths
    data:
      duration: "60"

Could I ask what the timer is for?

Edit: Looking through the forum I see that timer.change will only add to the duration if it doesn’t exceed the original set time. Could that be the problem?

I can’t remember exactly but something about the way timer works and how home-assistant does time makes this difficult. I looked at this for a auto close garage timer triggered by various things that could signal occupancy. I could not find a good way to increase time like you are trying. I just added a camera that could see the entire garage and an automation that sets the timer back to a few minutes when someone is detected.

Hi @Stiltjack I use +2500 just for example, I tried with 60 or -60 or 00:10:00 but the automation doesn’t change the value :frowning:

Of course:
Currently, when someone turns on the laundry room light, the system waits 10 minutes and then turns it off automatically.
However, if my wife goes in to wash something and it takes longer, the light turns off when she is in the room… I installed a motion sensor so that when the light is on, if someone enters, it will reset the automatic shut-off counter.

In the past I had it turn on when someone entered and turn off when there was no movement but it made it constantly turn the light on and off unnecessarily.

Could this be what you are looking for?

1 Like

Testing … was something like the first try but seams more efficient, I will test and update the post, thank you so much for your time and help :+1: