forked from jeremywillans/ha-rest980-roomba
-
Notifications
You must be signed in to change notification settings - Fork 0
/
lovelace.yaml
134 lines (134 loc) · 5.18 KB
/
lovelace.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
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
- badges: []
cards:
- entities:
- entity: sensor.vacuum_phase
- entity: sensor.vacuum_cycle
- entity: sensor.vacuum_battery
- entity: sensor.vacuum_bin
- entity: sensor.vacuum_dock
- entity: sensor.vacuum_location
- entities:
- input_boolean.vacuum_kitchen
- input_boolean.vacuum_entry
- input_boolean.vacuum_hall
- input_boolean.vacuum_living_room
- input_boolean.vacuum_bathroom
- input_boolean.vacuum_bedroom
- input_boolean.vacuum_wardrobe
- input_boolean.vacuum_master_ensuite
- input_boolean.vacuum_master_bedroom
- input_boolean.vacuum_table
- entity: automation.vacuum_clean_rooms
lock:
enabled: |
[[[
if (states['group.vacuum_rooms'].state == "off")
return true;
return false;
]]]
exemptions: []
name: Clean Rooms
styles:
card:
- height: 50px
tap_action:
action: call-service
service: automation.trigger
service_data:
entity_id: automation.vacuum_clean_rooms
type: 'custom:button-card'
head:
label: Selective Room Cleaning
type: section
type: 'custom:fold-entity-row'
show_header_toggle: false
type: entities
- cards:
- entity: rest_command.vacuum_action
icon: |
[[[
if (states['sensor.vacuum_cycle'].state == "Ready")
return "mdi:play";
else if ((states['sensor.vacuum_phase'].state == "Stopped/Paused") || (states['sensor.vacuum_phase'].state == "Stuck") || (states['sensor.vacuum_phase'].state == "Charging"))
return "mdi:play-pause";
return "mdi:pause"
]]]
layout: icon_name
lock:
enabled: |
[[[
if (states['sensor.vacuum_phase'].state == "Emptying Robot")
return true;
return false;
]]]
exemptions: []
name: |
[[[
if (states['sensor.vacuum_cycle'].state == "Ready")
return "Full Clean";
else if ((states['sensor.vacuum_phase'].state == "Stopped/Paused") || (states['sensor.vacuum_phase'].state == "Stuck") || (states['sensor.vacuum_phase'].state == "Charging"))
return "Resume";
return "Pause"
]]]
styles:
card:
- height: 50px
tap_action:
action: call-service
service: rest_command.vacuum_action
service_data:
command: |
[[[
if (states['sensor.vacuum_cycle'].state == "Ready")
return "start";
else if ((states['sensor.vacuum_phase'].state == "Stopped/Paused") || (states['sensor.vacuum_phase'].state == "Stuck") || (states['sensor.vacuum_phase'].state == "Charging"))
return "resume";
return "pause"
]]]
hold_action:
action: call-service
service: rest_command.vacuum_action
service_data:
command: |
[[[
if (states['sensor.vacuum_cycle'].state == "Ready")
return "start";
else if ((states['sensor.vacuum_phase'].state == "Stopped/Paused") || (states['sensor.vacuum_phase'].state == "Stuck") || (states['sensor.vacuum_phase'].state == "Charging"))
return "stop";
return "stop"
]]]
type: 'custom:button-card'
- entity: rest_command.vacuum_action
icon: 'mdi:home-minus'
layout: icon_name
lock:
enabled: |
[[[
if (states['sensor.vacuum_phase'].state == "Emptying Robot")
return true;
return false;
]]]
exemptions: []
name: |
[[[
if ((states['sensor.vacuum_phase'].state == "Charging") || (states['sensor.vacuum_phase'].state == "Fully Charged") || (states['sensor.vacuum_phase'].state == "Emptying Robot"))
return "Empty Bin";
return "Dock"
]]]
styles:
card:
- height: 50px
tap_action:
action: call-service
service: rest_command.vacuum_action
service_data:
command: dock
type: 'custom:button-card'
type: horizontal-stack
- aspect_ratio: 0%
camera_image: camera.roomba
entities: []
type: picture-glance
icon: 'mdi:robot-vacuum'
path: vacuum
title: Vacuum