I try since a couple of days to get my toiletfan-timer running.
The thing to do:
Someone go on the toilet and turn on the light less then 2 minutes nothing todo.
Someone go on the toilet and turn on the light more then 2 minutes the toiletfan shout run for 20 minutes.
If someone go on the toilet during the fan is running the time shout be run again backwards from 20.
My problem is, I can’t finde how to retrigger a running timer.
This are my automations:
alias: Wc Lüfter ein test
description: ''
trigger:
- platform: state
entity_id:
- light.licht_wc
to: 'on'
for:
hours: 0
minutes: 2
seconds: 0
condition: []
action:
- type: turn_on
device_id: bf714fa29a5e278ab6203e85554c3671
entity_id: switch.schalter_wc_2
domain: switch
mode: single
alias: Wc Lüfter timer test
description: ''
trigger:
- platform: state
entity_id:
- switch.schalter_wc_2
to: 'on'
condition: []
action:
- service: timer.start
data: {}
target:
entity_id: timer.wc_lufter_timer
mode: single
alias: Wc Lüfter aus test
description: ''
trigger:
- platform: event
event_type: timer.finished
event_data:
entity_id: timer.wc_lufter_timer
condition: []
action:
- type: turn_off
device_id: bf714fa29a5e278ab6203e85554c3671
entity_id: switch.schalter_wc_2
domain: switch
mode: single
That will re-start the timer even if its running. I’m going to guess you don’t have a duration value set in the timer as a default and you’re not specifying a duration in the automation itself.
This is not correct, the duration is set and it work.
At the moment the fan run when the light is longer on as 2 minutes and the light goes out. But if the light goes on when the fan run the duration from the timer doesen’t start again from 20minutes