From: Giorgio Ravera Date: Tue, 27 Oct 2026 10:26:50 +0000 (+0100) Subject: Added meetquack voice X-Git-Url: http://git.giorgioravera.it/?a=commitdiff_plain;h=d80ba61287a860e780ba24e48e0b2094b50abc5a;p=homeassistant.git Added meetquack voice --- diff --git a/scripts/audio.yaml b/scripts/audio.yaml index 2eb8c934..63041968 100644 --- a/scripts/audio.yaml +++ b/scripts/audio.yaml @@ -187,3 +187,50 @@ babu_voice_2: - action: script.babu_voice data: type: '2' + +###################################################################### +# Script: Quak +# Inputs: +# - type: +# 1 -> PI +# +# Operations: +# - script.volume_manager +# - media_player.play_media +###################################################################### + +quak_voice: + alias: Voce Quak + variables: + defaulMediaPlayer: 'media_player.google_home' + defaultVolume: 0.35 + media_player: >- + {# Check Null Input #} + {% if media_player | length == 0 %} + {% set media_player = defaulMediaPlayer %} + {% endif %} + {{ media_player }} + volume_level: >- + {# Check Null Input #} + {% if volume_level | length == 0 %} + {% set volume_level = defaultVolume %} + {% endif %} + {{ volume_level }} + + sequence: + - condition: state + entity_id: input_boolean.speech_notifications + state: 'on' + + - wait_template: "{{ not is_state(media_player, 'playing') }}" + + - action: script.volume_manager + data_template: + media_player: "{{media_player}}" + volume_level: "{{ volume_level }}" + + - action: media_player.play_media + data_template: + entity_id: "{{ media_player }}" + media_content_type: 'audio/mp4' + media_content_id: 'https://home.giorgioravera.it/local/audio/meetquack.mp3' diff --git a/www/audio/meetquack.mp3 b/www/audio/meetquack.mp3 new file mode 100755 index 00000000..733e1571 Binary files /dev/null and b/www/audio/meetquack.mp3 differ