Created
December 29, 2023 09:58
-
-
Save maxwellamaral/6bf0a340673d9f5d83d095a496f924c8 to your computer and use it in GitHub Desktop.
Blueprint do Home Assistant para anunciar a porta aberta
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Anuncia a porta aberta | |
# Referência https://community.home-assistant.io/t/door-open-tts-announcer/266252 | |
blueprint: | |
name: Door open TTS announcer | |
domain: automation | |
input: | |
door_entity: | |
name: Door Sensor | |
description: Entity that causes announcement | |
selector: | |
entity: | |
domain: binary_sensor | |
device_class: door | |
speaker_target: | |
name: Speaker | |
description: Entity to announce event on | |
selector: | |
target: | |
entity: | |
domain: media_player | |
announcement_message: | |
name: Announcement message | |
description: What to say when door is opened | |
final_message: | |
name: Final message | |
description: What to say when door is closed | |
cooldown: | |
name: Announcement cooldown | |
description: The minimum time needed in between announcements | |
default: 10 | |
selector: | |
number: | |
min: 0 | |
max: 600 | |
unit_of_measurement: seconds | |
mode: single | |
trigger: | |
platform: state | |
entity_id: !input door_entity | |
from: "off" | |
to: "on" | |
action: | |
- alias: Repeat the sequence UNTIL the door is closed | |
repeat: | |
sequence: | |
- delay: !input cooldown | |
- service: tts.google_translate_say | |
target: !input speaker_target | |
data: | |
message: !input announcement_message | |
until: | |
- condition: state | |
entity_id: !input door_entity | |
state: 'off' | |
- service: tts.google_translate_say | |
target: !input speaker_target | |
data: | |
message: !input final_message |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment