So I’m using the script below when someone rings the doorbell.
Are there better ways/solutions to make this more foolproof for:
- when another app has focus
- display is off/locked
alias: "Notification: Doorbell => phone"
sequence:
- service: notify.mobile_app_phone
data:
message: TTS
data:
ttl: 0
priority: high
media_stream: alarm_stream_max
tts_text: Someone is at the door
enabled: true
- service: notify.mobile_app_phone
data:
message: command_screen_on
enabled: true
- service: notify.mobile_app_phone
data:
message: command_webview
enabled: true
- delay:
hours: 0
minutes: 0
seconds: 5
milliseconds: 0
- service: browser_mod.popup
data:
size: fullscreen
browser_id: 75e1bad0-5ccf9174
content:
type: vertical-stack
cards:
- square: false
columns: 3
type: grid
cards:
- type: custom:config-template-card
entities:
- switch.gate1_status
card:
type: button
tap_action:
action: none
hold_action:
action: call-service
service: script.switch_gate1
data: {}
target: {}
name: Gate 1
show_name: false
entity: switch.gate1_status
icon: >-
${ states['switch.gate1_status'].state === 'on' ?
'mdi:gate-alert' : 'mdi:gate-arrow-right' }
- type: custom:config-template-card
entities:
- switch.gate2_status
card:
type: button
tap_action:
action: none
hold_action:
action: call-service
service: script.switch_gate2
data: {}
target: {}
name: Gate 2
show_name: false
entity: switch.gate2_status
icon: >-
${ states['switch.gate2_status'].state === 'on' ?
'mdi:gate-open' : 'mdi:gate' }
- type: custom:config-template-card
entities:
- switch.garagedoor_status
card:
type: button
tap_action:
action: none
hold_action:
action: call-service
service: script.switch_garagedoor
data: {}
target: {}
name: Garagedoor
show_name: false
entity: switch.garagedoor_status
icon: >-
${ states['switch.garagedoor_status'].state === 'on' ?
'mdi:garage-open-variant' : 'mdi:garage-variant' }
- camera_view: live
type: picture-glance
entities: []
camera_image: camera.door
dismissable: true
autoclose: false
- delay:
hours: 0
minutes: 0
seconds: 5
milliseconds: 0
- service: browser_mod.close_popup
data:
browser_id: 75e1bad0-5ccf9174
mode: single
Thanks for any help!