-
Notifications
You must be signed in to change notification settings - Fork 0
/
scripts.yaml
77 lines (77 loc) · 2.11 KB
/
scripts.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
sonos_say:
alias: Sonos text-to-speech script
sequence:
- service: sonos.snapshot
target:
entity_id: '{{ sonos_entity }}'
- service: sonos.unjoin
target:
entity_id: '{{ sonos_entity }}'
- service: media_player.volume_set
data:
entity_id: '{{ sonos_entity }}'
volume_level: '{{ volume }}'
- service: tts.google_translate_say
data:
entity_id: '{{ sonos_entity }}'
message: '{{ message }}'
- delay: '{{ delay }}'
- service: sonos.restore
target:
entity_id: '{{ sonos_entity }}'
mode: single
spotify_start:
alias: Start Spotify playback on selected device
sequence:
- service: spotcast.start
data:
entity_id: "{% set selected_device = states('input_select.chromecast_audio').lower()
%} {{ 'media_player.' + selected_device }} \n"
force_playback: true
mode: single
icon: mdi:spotify
cast_message:
alias: Cast a message to all speakers
sequence:
- service: media_player.volume_set
data:
volume_level: 0.8
target:
entity_id: media_player.alle_speakers
- service: tts.google_translate_say
entity_id: media_player.alle_speakers
data:
message: '{{ message }}'
language: nl
- delay:
hours: 0
minutes: 0
seconds: 10
milliseconds: 0
- service: media_player.volume_set
data:
volume_level: 0.5
target:
entity_id: media_player.alle_speakers
mode: single
icon: mdi:account-voice
set_electricity_consumption:
alias: Send electricity consumption to EnergyID
sequence:
- service: energy_id.set_meter_reading
data:
device_id: d204951ddbc573763e372d9565b2eb3d
value: '{{ states(''input_number.electricity_consumption'') | int }}'
date: '{{ now().isoformat() }}'
mode: single
icon: mdi:lightning-bolt
send_water_consumption_to_energyid:
alias: Send water consumption to EnergyID
sequence:
- service: energy_id.set_meter_reading
data:
device_id: e6246907c606b4607663e321954bf678
value: '{{ states(''input_number.water_consumption'') | int }}'
date: '{{ now().isoformat() }}'
mode: single
icon: mdi:water