added scripts et al

This commit is contained in:
2022-01-17 20:19:42 +01:00
parent ab06457787
commit 9eed84ee34
24 changed files with 2082 additions and 2 deletions
+24
View File
@@ -0,0 +1,24 @@
#https://github.com/arsaboo/homeassistant-config/blob/master/scripts.yaml
sonos_say:
alias: "Sonos TTS script"
sequence:
- service: sonos.snapshot
data_template:
entity_id: "{{ sonos_entity|default('media_player.alrum') }}"
- service: sonos.unjoin
data_template:
entity_id: "{{ sonos_entity|default('media_player.alrum') }}"
- service: media_player.volume_set
data_template:
entity_id: "{{ sonos_entity|default('media_player.alrum') }}"
volume_level: "{{ volume|default(0.5) }}"
- service: tts.google_translate_say
data_template:
entity_id: "{{ sonos_entity|default('media_player.alrum') }}"
message: "{{ message }}"
- delay: "{{ delay|default('00:00:00') }}"
- wait_template: "{{ is_state(sonos_entity|default('media_player.alrum'), 'playing') }}"
timeout: '00:00:05'
- service: sonos.restore
data_template:
entity_id: "{{ sonos_entity|default('media_player.alrum') }}"