forked from basnijholt/home-assistant-config
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvacuum.yaml
executable file
·98 lines (93 loc) · 2.31 KB
/
vacuum.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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
---
- alias: "Vacuum: started cleaning"
trigger:
platform: state
entity_id: vacuum.xiaomi_vacuum_cleaner
from: docked
to: cleaning
action:
service: notify.mobile_app_basnijholt_iphone
data:
title: "Robot"
message: "Robot started to clean!"
- alias: "Vacuum: stopped cleaning"
trigger:
platform: state
entity_id: vacuum.xiaomi_vacuum_cleaner
from: returning
to: docked
action:
- service: notify.mobile_app_basnijholt_iphone
data:
title: "Robot"
message: "Cleanup successful after {{ state_attr('vacuum.xiaomi_vacuum_cleaner', 'cleaning_time') }} minutes."
- service: input_boolean.turn_on
entity_id: input_boolean.cleaned_today
- alias: "Vacuum: reminder notification"
trigger:
platform: time
at: "08:00"
condition:
condition: time
weekday:
- mon
- wed
- fri
- sun
action:
service: notify.mobile_app_basnijholt_iphone
data:
title: "Robot"
message: "Vacuum will go today, make sure to leave the doors open and leave nothing on the floor!"
- alias: "Vacuum: cleanup if nobody is home"
trigger:
- platform: time
at: "13:00"
- platform: state
entity_id: group.persons
from: home
to: not_home
condition:
- condition: time
after: "13:00:00"
before: "22:00:00"
weekday:
- mon
- wed
- fri
- sun
- condition: state
entity_id: group.persons
state: not_home
- condition: state
entity_id: input_boolean.cleaned_today
state: "off"
- condition: or
conditions:
- condition: state
entity_id: input_boolean.guest_mode
state: "off"
- condition: state
entity_id: input_boolean.vacation_mode
state: "off"
action:
service: vacuum.start
entity_id: vacuum.xiaomi_vacuum_cleaner
- alias: "Vacuum: reset cleaned today"
initial_state: "on"
trigger:
platform: time
at: "01:00:00"
action:
service: input_boolean.turn_off
entity_id: input_boolean.cleaned_today
- alias: "Vacuum: reset to balanced mode"
trigger:
platform: state
entity_id: vacuum.living_room
to: docked
action:
service: vacuum.set_fan_speed
entity_id: vacuum.xiaomi_vacuum_cleaner
data:
fan_speed: Balanced