-
Notifications
You must be signed in to change notification settings - Fork 185
/
Copy pathutilities.yaml
executable file
·51 lines (48 loc) · 1.38 KB
/
utilities.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
---
#-
# _ _ _ _ _ _
# _ _| |_(_) (_) |_(_) ___ ___
# | | | | __| | | | __| |/ _ \/ __|
# | |_| | |_| | | | |_| | __/\__ \
# \__,_|\__|_|_|_|\__|_|\___||___/
#
#
#- from github.com/basnijholt/home-assistant-config
- alias: "Utilities: washing machine or dishwasher started or finished"
triggers:
- trigger: state
entity_id: binary_sensor.dishwasher
- trigger: state
entity_id: binary_sensor.washing_machine
variables:
from_state: "{{ trigger.from_state.state }}"
to_state: "{{ trigger.to_state.state }}"
name: "{{ trigger.entity_id.split('.', 1)[1] }}"
conditions: "{{ (to_state == 'on' and from_state == 'off') or (to_state == 'off' and from_state == 'on') }}"
actions:
action: input_datetime.set_datetime
data:
entity_id: "input_datetime.{{ name }}_{{ to_state }}"
timestamp: "{{ now().timestamp() }}"
- alias: "Utilities: washing machine notification"
triggers:
trigger: state
entity_id: binary_sensor.washing_machine
from: "off"
to: "on"
actions:
action: script.utility_notification
data:
name: "washing_machine"
emojis: "👚👕"
- alias: "Utilities: dishwasher notification"
triggers:
trigger: state
entity_id: binary_sensor.dishwasher
from: "off"
to: "on"
actions:
action: script.utility_notification
data:
name: "dishwasher"
emojis: "🍽🍳"