Dear all,
I have an automation that is triggered once somebody pressed the doorbell button. The following amin steps are performed:
- Take snapshot of doorbell camera
- Change suveillance camera’s angle to look at the entrance door
- Send image to my smartphone along with an actionable notification.
- Set the wait-for-trigger statement to 30 seconds to make a selection (e.g. open door or go to dashboard).
If there is no selection within 30 seconds, there’s a timeout and the script stops.
However, what I want to do in any case - regardless of timeout or trigger was received - is to change the camera back to another position after 2 minutes.
The problem is that after the timeout, the script does reach the second “change-camera-angle”. The camera keeps pointing at the entrace door.
Here is the yaml code
alias: doorbell_button_pressed
sequence:
- target:
entity_id: camera.g8t1_tv02_3155_0j71
data: {}
action: blink.trigger_camera
- action: select.select_option
metadata: {}
data:
option: Gate Person
target:
entity_id: select.tapo_c210_einfahrt_move_to_preset
- delay:
hours: 0
minutes: 0
seconds: 0
milliseconds: 100
- data: {}
target:
entity_id: camera.g8t1_tv02_3155_0j71
action: homeassistant.update_entity
- delay:
hours: 0
minutes: 0
seconds: 0
milliseconds: 100
- target:
entity_id: camera.g8t1_tv02_3155_0j71
data:
filename: >-
/media/blink_doorbell_image/{{ now().strftime("%Y-%m-%d")
}}/tuerklingel_{{ now().strftime("%Y-%m-%d-%H%M") }}.jpg
action: camera.snapshot
- data:
message: Someone is at the door
title: Doorbell button pressed
data:
ttl: 0
priority: high
channel: Doorbell
image: /api/camera_proxy/camera.g8t1_tv02_3155_0j71
actions:
- action: OPEN_DOOR
title: Open door
- action: URI
title: Open Blink App
uri: app://com.immediasemi.android.blink
- action: URI
title: Open Dashboard
uri: /lovelace/default_view
enabled: true
action: notify.all_devices
- wait_for_trigger:
- platform: event
event_type: mobile_app_notification_action
event_data:
action: OPEN_DOOR
timeout:
hours: 0
minutes: 0
seconds: 30
milliseconds: 0
continue_on_timeout: false
- metadata: {}
data: {}
target:
entity_id: switch.toroeffner_switch_0
action: switch.toggle
- delay:
hours: 0
minutes: 2
seconds: 0
milliseconds: 100
- action: select.select_option
metadata: {}
data:
option: Garage
target:
entity_id: select.tapo_c210_einfahrt_move_to_preset
mode: single
icon: mdi:doorbell-video
Can you advise please ?