mirror of
https://github.com/GeorgeSG/sarah.git
synced 2026-05-10 10:24:42 +00:00
Add volume_level to script.say. Adjust in alarm
This commit is contained in:
@@ -73,6 +73,7 @@ automation:
|
|||||||
- service: script.sonos_say
|
- service: script.sonos_say
|
||||||
data:
|
data:
|
||||||
message: "Hey! It's time to wake up!"
|
message: "Hey! It's time to wake up!"
|
||||||
|
volume_level: 0.15
|
||||||
- delay: 00:00:05
|
- delay: 00:00:05
|
||||||
- service: media_player.volume_set
|
- service: media_player.volume_set
|
||||||
entity_id: media_player.master_bedroom
|
entity_id: media_player.master_bedroom
|
||||||
@@ -86,6 +87,7 @@ automation:
|
|||||||
- service: script.sonos_say
|
- service: script.sonos_say
|
||||||
data:
|
data:
|
||||||
message: "Good morning! Time to get out of bed!"
|
message: "Good morning! Time to get out of bed!"
|
||||||
|
volume_level: 0.2
|
||||||
- delay: 00:00:05
|
- delay: 00:00:05
|
||||||
- service: media_player.volume_set
|
- service: media_player.volume_set
|
||||||
entity_id: media_player.master_bedroom
|
entity_id: media_player.master_bedroom
|
||||||
@@ -99,6 +101,7 @@ automation:
|
|||||||
- service: script.sonos_say
|
- service: script.sonos_say
|
||||||
data:
|
data:
|
||||||
message: "Hey! It's time to wake up!"
|
message: "Hey! It's time to wake up!"
|
||||||
|
volume_level: 0.3
|
||||||
- delay: 00:00:05
|
- delay: 00:00:05
|
||||||
- service: media_player.volume_set
|
- service: media_player.volume_set
|
||||||
entity_id: media_player.master_bedroom
|
entity_id: media_player.master_bedroom
|
||||||
|
|||||||
@@ -36,6 +36,7 @@ script:
|
|||||||
# Combine partials for speech message.
|
# Combine partials for speech message.
|
||||||
- service: script.say_discretely
|
- service: script.say_discretely
|
||||||
data_template:
|
data_template:
|
||||||
|
volume_level: "{{ volume_level }}" # For sonos only
|
||||||
message: >-
|
message: >-
|
||||||
{%- if partials is defined -%}
|
{%- if partials is defined -%}
|
||||||
{%- for partial in partials -%}
|
{%- for partial in partials -%}
|
||||||
@@ -60,6 +61,7 @@ script:
|
|||||||
data_template:
|
data_template:
|
||||||
title: "💬 *Speech Module*" # For telegram only
|
title: "💬 *Speech Module*" # For telegram only
|
||||||
message: "{{ message }}"
|
message: "{{ message }}"
|
||||||
|
volume_level: "{{ volume_level }}" # For sonos only
|
||||||
|
|
||||||
sonos_blast:
|
sonos_blast:
|
||||||
alias: Speech · Sonos blast
|
alias: Speech · Sonos blast
|
||||||
@@ -72,11 +74,15 @@ script:
|
|||||||
entity_id: media_player.master_bedroom
|
entity_id: media_player.master_bedroom
|
||||||
data_template:
|
data_template:
|
||||||
volume_level: >-
|
volume_level: >-
|
||||||
|
{% if volume_level %}
|
||||||
|
{{ volume_level }}
|
||||||
|
{% else %}
|
||||||
{% if now().strftime('%H')|int < 6 and now().strftime('%H')|int > 0 %}
|
{% if now().strftime('%H')|int < 6 and now().strftime('%H')|int > 0 %}
|
||||||
0.2
|
0.2
|
||||||
{% else %}
|
{% else %}
|
||||||
0.4
|
0.4
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
{% endif %}
|
||||||
# Say message.
|
# Say message.
|
||||||
- service: tts.amazon_polly_say
|
- service: tts.amazon_polly_say
|
||||||
data_template:
|
data_template:
|
||||||
|
|||||||
Reference in New Issue
Block a user