This simple blueprint uses tts.google_say
and an entity with device_class: motion
(use the customization panel if your sensor doesn’t have it).
blueprint:
name: Motion TTS announcer
domain: automation
input:
motion_entity:
name: Motion Sensor
description: Entity that causes announcement
selector:
entity:
domain: binary_sensor
device_class: motion
speaker_target:
name: Speaker
description: Entity to announce motion on
selector:
target:
entity:
domain: media_player
announcement_message:
name: Announcement message
description: What to say when motion is detected
cooldown:
name: Announcement cooldown
description: The minimum time needed in between announcements
default: 30
selector:
number:
min: 0
max: 600
unit_of_measurement: seconds
mode: single
trigger:
platform: state
entity_id: !input motion_entity
from: "off"
to: "on"
action:
- service: tts.google_translate_say
target: !input speaker_target
data:
message: !input announcement_message
- wait_for_trigger:
platform: state
entity_id: !input motion_entity
from: "on"
to: "off"
- delay: !input cooldown