Skip to content

Instantly share code, notes, and snippets.

@Didgeridrew
Last active February 11, 2021 22:20
Show Gist options
  • Save Didgeridrew/5df982a0d2eeb9aae194820d12f4d703 to your computer and use it in GitHub Desktop.
Save Didgeridrew/5df982a0d2eeb9aae194820d12f4d703 to your computer and use it in GitHub Desktop.
Alexa announce for Shane
```
alias: Close Doors
sequence:
- service: notify.alexa_media
data_template:
target:
- media_player.player1
- media_player.player2
- media_player.player3
data:
type: announce
message: >-
{% if is_state('binary_sensor.balcony_door_contact', 'open') and is_state('binary_sensor.bedroom_window_contact', 'open') %}
Please close the balcony door and bedroom window.
{% elif is_state('binary_sensor.bedroom_window_contact', 'open') %}
Please close the bedroom window
{% elif is_state('binary_sensor.balcony_door_contact', 'open') %}
Please close the Balcony Door
{% else %}
Everything is closed, turning on aircon
{% endif %}
mode: single
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment