@@ -16,7 +16,7 @@ script:
1616 media_player : media_player.studio, media_player.sala
1717 volume : 0.4
1818 google :
19- media_player : media_player.red, media_player.black2
19+ media_player : media_player.red, media_player.black_due
2020 volume : 0.4
2121 title : >-
2222 M0 - {{now().time()}}
@@ -72,10 +72,8 @@ script:
7272 - service : script.my_notify
7373 data :
7474 call_no_annuncio : 1
75- alexa :
76- mode : true
77- google :
78- mode : true
75+ alexa : true
76+ google : true
7977 title : >-
8078 M4 - {{now().time()}}
8179 message : >-
@@ -85,10 +83,8 @@ script:
8583 - service : script.my_notify
8684 data :
8785 call_no_annuncio : 1
88- alexa :
89- mode : true
90- google :
91- mode : true
86+ alexa : true
87+ google : true
9288 title : >-
9389 M5 - {{now().time()}}
9490 message : >-
@@ -97,7 +93,7 @@ script:
9793 {% set alexa = 'Media player selezionato '
9894 + states('input_select.notification_media_player_alexa')
9995 + '. Tipo ' + states('input_select.default_alexa_type')
100- + '. Metodo ' + ('Nessuno' if states('input_select.default_alexa_method5 ') == 'unknown' else states('input_select.default_alexa_method5 ')) %}
96+ + '. Metodo ' + ('Nessuno' if states('input_select.default_alexa_method ') == 'unknown' else states('input_select.default_alexa_method ')) %}
10197 {% endif %}
10298 {% if states('input_boolean.google_switch') == 'on' %}
10399 {% set google = '. Google media player selezionato ' + states('input_select.notification_media_player_google')
@@ -110,15 +106,20 @@ script:
110106 +', Notifiche vocali ' + states('input_boolean.speech_notifications')
111107 +', Notifiche testo ' + states('input_boolean.text_notifications')
112108 +', Notifiche persistenti ' + states('input_boolean.screen_notifications') %}
113- {{(alexa ~ google ~ message)|replace(' off',' spento')|replace(' on',' acceso')}}
109+ {{(alexa|default ~ google|default ~ message)|replace(' off',' spento')|replace(' on',' acceso')}}
114110
115111 centro_notifiche_alexa_test :
116112 alias : ' Centro Notifiche Alexa Test'
117113 sequence :
114+ - variables :
115+ my_variable : >
116+ {% if is_state('alarm_control_panel.home_alarm', 'triggered')
117+ and is_state('input_boolean.allarme_silenzioso', 'off')-%}
118+ 0 {% else -%} 1 {%- endif %}
118119 - service : script.my_notify
119120 data :
120- call_no_annuncio : 1
121- alexa :
121+ message : " Alert "
122+ " {{' alexa' if my_variable else ''}} " :
122123 message : " Houston, we have a problem! "
123124 language : en-US
124125 voice : Matthew
@@ -135,8 +136,7 @@ script:
135136 data :
136137 alexa :
137138 message : >
138- sono le {{now().strftime("%H:%M")}}
139- e sogni d'oro.
139+ sono le {{now().strftime("%H:%M")}}, sogni d'oro.
140140 a ah, che bello!
141141 - delay : " 00:01:00"
142142 - service : script.my_notify
@@ -152,4 +152,4 @@ script:
152152 # media_content_id: Alexa.SingASong.Play
153153 # media_content_id: Alexa.TellStory.Play
154154 # media_content_id: Alexa.Joke.Play
155- # media_content_id: Alexa.ImHome.Play
155+ # media_content_id: Alexa.ImHome.Play
0 commit comments