Try as I might, I can’t seem to get the magic to work. Using a variable open/closed in the spoken phrase is eluding me. It should be simple and obvious, but nothing I’ve tried works.
Tts_open ="Front Gate is Opening"
Tts_closed="Front Gate is Completely Closed"
Any insight would be great, or I just live with 2 automations, though I’d like to know how to do this in the future.
alias: TTS When Gate Starts to Open
description: ''
trigger:
- platform: state
entity_id: binary_sensor.gate_open_sw
from: 'off'
to: 'on'
condition: []
action:
- service: notify.alexa_media_everywhere
data:
data:
type: announce
message: Front Gate is Opening
mode: single
- id: '1600813852279'
alias: TTS When Gate Closed
description: ''
trigger:
- platform: state
entity_id: binary_sensor.gate_open_sw
from: 'on'
to: 'off'
condition: []
action:
- service: notify.alexa_media_everywhere
data:
data:
type: announce
message: Front Gate is Completely Closed
mode: single