Skip to content

Instantly share code, notes, and snippets.

@chadbaldwin
Last active September 1, 2023 00:54
Show Gist options
  • Save chadbaldwin/a551d7b79ca5c9981b8fe503f8f2af5a to your computer and use it in GitHub Desktop.
Save chadbaldwin/a551d7b79ca5c9981b8fe503f8f2af5a to your computer and use it in GitHub Desktop.
Home Assistant - Create an Alert that announces on Google Home when the garage door has been left open and there has beeen no motion for at least 5 minutes
tts:
- platform: google_translate
template:
- binary_sensor:
- name: garage_open_no_motion
state: >
{{
(is_state('binary_sensor.contact_7_contact', 'on'))
and
(now() - states.group.garage_motion.last_changed) > timedelta(minutes=5)
}}
notify:
- platform: tts
name: notify_living_room
tts_service: tts.google_translate_say
media_player: media_player.living_room_home
alert:
garage_door_open_alert:
name: Garage Door Open - Alert
entity_id: binary_sensor.garage_open_no_motion
repeat: 5
skip_first: true
message: "Garage door is open"
notifiers:
- notify_living_room
@chadbaldwin
Copy link
Author

[reserving first comment]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment