Actionable notification to optionally arm security on "Give Me Darkness"

This commit is contained in:
2022-08-29 03:30:24 -04:00
parent e5672eaee0
commit 7f0513a129
2 changed files with 42 additions and 1 deletions

View File

@ -81,6 +81,43 @@ automation:
action: action:
- service: script.kallen_desktop_wake - service: script.kallen_desktop_wake
- id: d1edfcf7-2712-49f4-b8f1-17f5b184b5ce
alias: Arm security on Give Me Darkness
trigger:
- platform: event
event_type: alexa_actionable_notification
event_data:
event_id: actionable_notification_night_security_arm
event_response_type: ResponseYes
id: security-yes
- platform: event
event_type: alexa_actionable_notification
event_data:
event_id: actionable_notification_night_security_arm
event_response_type: ResponseNo
id: security-no
action:
- if:
- condition: trigger
id: security-yes
then:
- service: script.security_arm_home
- delay:
seconds: 1
- service: script.speech_engine
data:
who: "{{ states('sensor.last_alexa') }}"
message: "Security is armed, guard dogs deployed, and lasers set from stun to kill!"
- if:
- condition: trigger
id: security-no
then:
- service: script.speech_engine
data:
who: "{{ states('sensor.last_alexa') }}"
message: "Security squadron is standing down, but always at your service!"
script: script:
activate_alexa_actionable_notification: activate_alexa_actionable_notification:

View File

@ -56,7 +56,11 @@ give_me_darkness:
{% else %} {% else %}
true true
{% endif %} {% endif %}
- service: script.security_arm_home - service: script.activate_alexa_actionable_notification
data_template:
text: 'Would you like me to arm the security system?'
event_id: 'actionable_notification_night_security_arm'
alexa_device: "{{ states('sensor.last_alexa') }}"
mode: single mode: single
icon: mdi:weather-night icon: mdi:weather-night
start_youtube: start_youtube: