I have trouble with an automation, it works for the first time. However if i forget to respond on the notification i’d like to be remember next time. i just now loops once (set time to be notified and the notifies when time is met)
How can i preform another action so it will set the next time to be fired ?
great thank in advance
alias: Rolluiken beneden open melding
description: ""
trigger:
- platform: state
entity_id:
- group.shutters_beneden
to: open
id: ROLLUIK_BENEDEN_OPEN
- platform: state
entity_id:
- input_select.thuis_mode
id: THUIS_MODE_CHANGE
from: Thuis
- platform: time
at: input_datetime.rolluiken_beneden_open
id: ROLLUIK_TIMESTAMP
condition:
- condition: state
entity_id: group.shutters_beneden
state: open
action:
- choose:
- conditions:
- condition: trigger
id:
- ROLLUIK_TIMESTAMP
sequence:
- action: notify.mobile_app_phone_joey
data:
title: Rolluiken geopend
data:
actions:
- action: SLUIT_ROLLUIKEN_BENEDEN
title: sluit rolluik
- action: NEGEER
title: negeer
destructive: true
message: >-
{{ expand(states.group.shutters_beneden) |
rejectattr('state','eq','closed') |
map(attribute='entity_id') | map('state_attr', 'friendly_name')
| list | join(', ') }} staat al {{ (as_timestamp(now())
- as_timestamp(states.group.shutters_beneden.last_changed))
| timestamp_custom ('%M') }} minuten geopend
- conditions:
- condition: or
conditions:
- condition: trigger
id:
- ROLLUIK_BENEDEN_OPEN
- THUIS_MODE_CHANGE
sequence:
- if:
- condition: state
entity_id: input_select.thuis_mode
state: Thuis
then:
- action: input_datetime.set_datetime
target:
entity_id: input_datetime.rolluiken_beneden_open
data:
timestamp: "{{ now().timestamp() + (15*60) }}"
else:
- action: input_datetime.set_datetime
target:
entity_id: input_datetime.rolluiken_beneden_open
data:
timestamp: "{{ now().timestamp() + (3*60) }}"
mode: single
alias: Rolluiken beneden open actie
description: ""
trigger:
- platform: event
event_type: mobile_app_notification_action
event_data:
action: SLUIT_ROLLUIKEN_BENEDEN
id: SLUIT_ROLLUIKEN_BENEDEN_TRIGGER
- platform: event
event_type: mobile_app_notification_action
event_data:
action: NEGEER
id: NEGEER_TRIGGER
condition: []
action:
- choose:
- conditions:
- condition: trigger
id:
- SLUIT_ROLLUIKEN_BENEDEN_TRIGGER
sequence:
- action: notify.mobile_app_phone_joey
metadata: {}
data:
message: " {{ expand(states.group.shutters_beneden) | rejectattr('state','eq','closed') | map(attribute='entity_id') | map('state_attr', 'friendly_name') | list | join(', ') }} wordt gesloten "
- action: script.rolluiken_sluiten_beneden
metadata: {}
data: {}
- conditions:
- condition: trigger
id:
- NEGEER_TRIGGER
sequence: []
mode: single