Hi there,
I am using a timer “Add delay” in an automation to ait for 3 minutes before next action is launched, but I do it either wrong, or either this is nor reliable.
See example below, I see in the Automation execution that the timer is launched, but next action is never launched although the 3 minutes are elapsed.
Is it a known issue ?
- service: persistent_notification.create
data:
message: browser_mod est lancé, je lance timer 3 minutes avant de remettre
sur 30
title: Dahua_VTO
- delay:
hours: 0
minutes: 3
seconds: 0
milliseconds: 0
- service: persistent_notification.create
data:
message: Timer terminé, je remets sur 30
title: Dahua_VTO
- service: number.set_value
data:
value: '30'
target:
entity_id: number.lenovo_tab_m10_plus_3rd_gen_screen_off_timer
First notification is sent, then timer is launched (3 minutes), but after the 3 minutes, the next notification is not coming.
I am sharing my full automation just in case … as you can see I have set a persistant notification at each step to debug.
- id: 4cf62087-4164-4685-be6d-2ede8401d5fa
alias: Dahua VTO
trigger:
- platform: event
event_type: dahua_vto
event_data:
Code: BackKeyLight
action:
- choose:
- conditions:
- condition: template
value_template: '{{ trigger.event.data.Data.State | int in [1, 2] }}'
sequence:
- service: persistent_notification.create
data:
title: '{{ ''Doorbell Ring'' if trigger.event.data.Data.State | int in [1,
2] else ''Doorbell No Ring'' }}'
message: '{{ trigger.event.data }}'
- service: switch.turn_on
metadata: {}
data: {}
target:
entity_id: switch.lenovo_tab_m10_plus_3rd_gen_screen
- service: persistent_notification.create
data:
title: Dahua_VTO
message: Allumé l'écran ... je démarre la musique
- service: media_player.play_media
target:
entity_id: media_player.lenovo_tab_m10_plus_3rd_gen
data:
media_content_type: music
media_content_id: http://xxx.be:8123/local/Lili25.mp3
- service: persistent_notification.create
data:
title: Dahua_VTO
message: Musique démarrée, je mets sur 300
- service: number.set_value
data:
value: '300'
target:
entity_id: number.lenovo_tab_m10_plus_3rd_gen_screen_off_timer
enabled: true
- service: persistent_notification.create
data:
title: Dahua_VTO
message: Mis sur 300, je lance browser_mod
- service: browser_mod.popup
data:
title: Caméra Extérieure
dismissable: false
content:
camera_view: live
type: picture-glance
entities: []
camera_image: camera.192_168_1_110
timeout: 120000
size: fullscreen
browser_id:
- Lenovo-tablette
right_button: Raccrocher
right_button_action:
service: media_player.media_stop
data:
entity_id: media_player.lenovo_tab_m10_plus_3rd_gen
left_button: Laisser vidéo 5m
left_button_action:
service: browser_mod.sequence
data:
sequence:
- service: browser_mod.popup
data:
title: Caméra Extérieure
dismissable: true
content:
camera_view: live
type: picture-glance
entities: []
camera_image: camera.192_168_1_110
timeout: 300000
size: fullscreen
browser_id:
- Lenovo-tablette
- service: media_player.media_stop
data:
entity_id: media_player.lenovo_tab_m10_plus_3rd_gen
- service: persistent_notification.create
data:
message: browser_mod est lancé, je lance timer 3 minutes avant de remettre
sur 30
title: Dahua_VTO
- delay:
hours: 0
minutes: 3
seconds: 0
milliseconds: 0
- service: persistent_notification.create
data:
message: Timer terminé, je remets sur 30
title: Dahua_VTO
- service: number.set_value
data:
value: '30'
target:
entity_id: number.lenovo_tab_m10_plus_3rd_gen_screen_off_timer
- service: persistent_notification.create
data:
title: Dahua_VTO
message: Remis sur 30, tout est fini
mode: restart