-
Notifications
You must be signed in to change notification settings - Fork 185
/
vacuum.yaml
executable file
·107 lines (102 loc) · 2.62 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
99
100
101
102
103
104
105
106
107
---
#-
#
# __ ____ _ ___ _ _ _ _ _ __ ___
# \ \ / / _` |/ __| | | | | | | '_ ` _ \
# \ V / (_| | (__| |_| | |_| | | | | | |
# \_/ \__,_|\___|\__,_|\__,_|_| |_| |_|
#
#
#- from github.com/basnijholt/home-assistant-config
- alias: "Vacuum: started cleaning"
trigger:
platform: state
entity_id: vacuum.xiaomi_vacuum_cleaner
from: docked
to: cleaning
action:
service: notify.all_iphones
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.all_iphones
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: state
entity_id: binary_sensor.vacuum_day
state: "on"
action:
service: notify.all_iphones
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
- platform: state
entity_id: binary_sensor.openclose_guest_room
from: "off"
to: "on"
condition:
- condition: state
entity_id: binary_sensor.openclose_guest_room
state: "on"
- condition: time
after: "13:00:00"
before: "22:00:00"
- condition: state
entity_id: binary_sensor.vacuum_day
state: "on"
- condition: state
entity_id: group.persons
state: not_home
- condition: state
entity_id: input_boolean.cleaned_today
state: "off"
- 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: "00:00:00"
action:
service: input_boolean.turn_off
entity_id: input_boolean.cleaned_today
- alias: "Vacuum: reset to standard 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: Standard