--- /dev/null
+######################################################################\r
+# Script: Laura\r
+# Inputs: \r
+# - type:\r
+# 1 -> bell'affare\r
+#\r
+# Operations:\r
+# - media_player.play_media\r
+######################################################################\r
+\r
+laura_voice:\r
+ alias: Voce Laura\r
+ sequence:\r
+ - condition: state\r
+ entity_id: input_boolean.speech_notifications\r
+ state: 'on'\r
+ \r
+ - service: script.notify_volume_manager\r
+ data_template:\r
+ media_player: "{{ media_player }}"\r
+ volume_level: "{{ volume_level }}"\r
+\r
+ - service: media_player.play_media\r
+ data_template:\r
+ entity_id: >-\r
+ {# Check Null Input #}\r
+ {% if media_player | length == 0 %}\r
+ {% set media_player = 'media_player.google_home' %}\r
+ {% endif %}\r
+ {{ media_player }}\r
+ media_content_type: 'audio/mp4'\r
+ media_content_id: >-\r
+ {% if type is not defined %}\r
+ {% set type = 1 %}\r
+ {% endif %}\r
+ https://home.giorgioravera.it/local/audio/laura/{{type}}.mp3\r
enable_persistent: "{{ enable_persistent }}"\r
\r
######################################################################\r
-# Script: Voice Notification\r
+# Script: Volume Manager\r
# Input:\r
# - media_player\r
# - volume_level\r
-# - language\r
-# - message\r
#\r
# Operations:\r
# - media_player.volume_set\r
-# - tts.google_say\r
######################################################################\r
\r
-notify_voice:\r
- alias: Notifiche vocali\r
+notify_volume_manager:\r
+ alias: Gestione Volume\r
sequence:\r
- - condition: state\r
- entity_id: input_boolean.speech_notifications\r
- state: 'on'\r
- \r
- service: media_player.volume_set\r
data_template:\r
entity_id: >-\r
volume_level: >-\r
{# Default Values #}\r
{% set defaultVolume = 0.30 %}\r
- {% set maxDayVolume = 0.50 %}\r
+ {% set maxDayVolume = 0.60 %}\r
{% set maxNightVolume = 0.20 %}\r
\r
{# Check Null Input #}\r
{% endif %}\r
{% endif %}\r
\r
+######################################################################\r
+# Script: Voice Notification\r
+# Input:\r
+# - media_player\r
+# - volume_level\r
+# - language\r
+# - message\r
+#\r
+# Operations:\r
+# - script.notify_volume_manager\r
+# - tts.google_say\r
+######################################################################\r
+\r
+notify_voice:\r
+ alias: Notifiche vocali\r
+ sequence:\r
+ - condition: state\r
+ entity_id: input_boolean.speech_notifications\r
+ state: 'on'\r
+ \r
+ - service: script.notify_volume_manager\r
+ data_template:\r
+ media_player: "{{ media_player }}"\r
+ volume_level: "{{ volume_level }}"\r
+\r
- service: tts.google_say\r
data_template:\r
entity_id: >-\r