I spent hours trying to figure out why I couldn’t add time to a timer, then I found:
And how I’m working around it now:
- alias: Start or add 30 minutes to Camera-Disable Timer
if:
- condition: state
entity_id: timer.camera_disable_timer
state: active
for:
hours: 0
minutes: 0
seconds: 0
then:
- action: timer.start
metadata: {}
target:
entity_id: timer.camera_disable_timer
data:
duration: >
{{ (state_attr('timer.camera_disable_timer', 'finishes_at') |
as_datetime - now() + timedelta(minutes=30)).total_seconds() |
round(0) }}
alias: Add 30 minutes to timer
else:
- alias: Set it really high
action: timer.start
metadata: {}
data:
duration: "60:30:00"
target:
entity_id: timer.camera_disable_timer
- action: timer.change
metadata: {}
data:
duration: "-60:00:00"
target:
entity_id: timer.camera_disable_timer
alias: Reduce it by all but 30 minutes