Home-AssistantConfig/config/automation/Speech/door_opened.yaml

38 lines
1.2 KiB
YAML
Executable File

######################################################################
## Door Open Announcements
######################################################################
- alias: 'Door Opened'
id: 18b09251-ea05-46c6-b14f-e7996cc40e89
trigger:
- platform: state
entity_id:
- binary_sensor.mcu1_gpio5 # Front door #
- binary_sensor.mcu2_gpio5 # Back door #
- binary_sensor.MCU2_GPIO12 # Main Slider
- binary_sensor.MCU1_GPIO12 # Interior Garage Door #
from: 'off'
to: 'on'
condition:
- condition: state
entity_id: binary_sensor.sleepnumber_carlo_carlo_is_in_bed
state: 'on'
- condition: state
entity_id: binary_sensor.sleepnumber_carlo_stacey_is_in_bed
state: 'on'
action:
- service: script.notify_engine
data:
who: 'parents'
value1: "The {{ trigger.to_state.attributes.friendly_name }} has been {{ (trigger.to_state.state)|replace('_', ' ') }}."
group: 'information'
- service: input_boolean.turn_on
entity_id: input_boolean.alert_mode
- service: script.speech_engine
data:
call_window_check: 1
call_inside_weather: 1