-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathscripts.yaml
76 lines (76 loc) · 2.23 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
stop_sonos_players:
alias: Stop media players
sequence:
- service: media_player.media_stop
data: {}
entity_id: media_player.office
mode: single
list_all_available_domains:
alias: List all available domains
sequence:
- service: notify.notify
data:
message: '{%- for d in states | groupby(''domain'') %} {{ d[0] }} {%- endfor
%}'
- service: notify.persistent_notification
data:
message: '{{ states | groupby(''domain'') | map(attribute=''0'') | list | join(''\n'')
}}'
mode: single
icon: mdi:script
create_group_for_firmware_updates:
alias: Create Group "Firmware Updates"
sequence:
- service: group.remove
data:
object_id: updates_firmware
- service: group.set
data_template:
object_id: updates_firmware
entities: "{{ states.update\n | selectattr('attributes.device_class', 'defined')\n
\ | selectattr('attributes.device_class','in',['firmware'])\n | rejectattr('entity_id','contains','something_to_exclude')\n
\ | map(attribute='entity_id')\n | join(',') }}\n"
mode: restart
icon: mdi:update
create_group_for_software_updates:
alias: Create Group "Software Updates"
sequence:
- service: group.remove
data:
object_id: updates_software
- service: group.set
data_template:
object_id: updates_software
entities: "{{ states.update\n | rejectattr('attributes.device_class','in',['firmware'])\n
\ | map(attribute='entity_id')\n | list \n }}\n"
mode: restart
icon: mdi:update
dingz_light_level_generic:
alias: Dingz Light Level Generic
sequence:
- service: rest_command.dingz_generic_dimmer
data:
dimmer: '{{ dimmer }}'
enum: '{{ enum }}'
value: '{{ brightness }}'
ip: '{{ ip }}'
- service: homeassistant.update_entity
target:
entity_id: '{{ force_entity }}'
mode: parallel
icon: hass:lightbulb
max: 10
dingz_light_level_generic_onoff:
alias: Dingz Light Level Generic onoff
sequence:
- service: rest_command.dingz_generic_dimmer_onoff
data:
dimmer: '{{ dimmer }}'
enum: '{{ enum }}'
ip: '{{ ip }}'
- service: homeassistant.update_entity
target:
entity_id: '{{ force_entity }}'
mode: parallel
icon: hass:lightbulb
max: 20