Xiaomi Vacuum Card
A card that allows you to view your Xiaomi Vacuum in Card form.
This card uses these components that you also need to install:
vacuum_card.jpg
168KB
Binary
Background for this card
1
- type: picture-elements
2
image: /local/vacuum_card.jpg
3
elements:
4
- type: icon
5
icon: mdi:bell-ring
6
tap_action:
7
action: call-service
8
service: vacuum.locate
9
service_data:
10
entity_id: vacuum.xiaomi_vacuum_cleaner
11
style:
12
top: 80%
13
left: 80%
14
"--paper-item-icon-color": rgb(115, 122, 130)
15
16
- type: icon
17
icon: mdi:home
18
tap_action:
19
action: call-service
20
service: vacuum.return_to_base
21
service_data:
22
entity_id: vacuum.xiaomi_vacuum_cleaner
23
style:
24
top: 80%
25
left: 65%
26
"--paper-item-icon-color": rgb(115, 122, 130)
27
28
- type: icon
29
icon: mdi:play
30
tap_action:
31
action: call-service
32
service: vacuum.start
33
service_data:
34
entity_id: vacuum.xiaomi_vacuum_cleaner
35
style:
36
top: 80%
37
left: 50%
38
"--paper-item-icon-color": rgb(115, 122, 130)
39
40
- type: icon
41
icon: mdi:pause
42
tap_action:
43
action: call-service
44
service: vacuum.pause
45
service_data:
46
entity_id: vacuum.xiaomi_vacuum_cleaner
47
style:
48
top: 80%
49
left: 35%
50
"--paper-item-icon-color": rgb(115, 122, 130)
51
52
- type: icon
53
icon: mdi:stop
54
tap_action:
55
action: call-service
56
service: vacuum.stop
57
service_data:
58
entity_id: vacuum.xiaomi_vacuum_cleaner
59
style:
60
top: 80%
61
left: 20%
62
"--paper-item-icon-color": rgb(155, 122, 130)
63
64
- type: state-label
65
entity: sensor.vacuum_status
66
style:
67
top: 10%
68
left: 5%
69
color: rgb(255, 255, 255)
70
transform: translate(0%,-50%)
71
pointer-events: none
72
text-shadow: 1px 1px black
73
font-family: Trebuchet MS
74
font-size: 90%
75
font-weight: bold
76
border-left-style: solid
77
border-color: rgb(34, 154, 210)
78
background-color: rgb(54, 65, 78)
79
opacity: 0.8
80
81
- type: state-label
82
entity: sensor.vacuum_battery
83
style:
84
top: 10%
85
right: 5%
86
color: rgb(255, 255, 255)
87
transform: translate(0%,-50%)
88
pointer-events: none
89
text-shadow: 1px 1px black
90
font-family: Trebuchet MS
91
font-size: 90%
92
font-weight: bold
93
border-right-style: solid
94
border-color: rgb(34, 154, 210)
95
background-color: rgb(54, 65, 78)
96
opacity: 0.8
Copied!
Here is the package for the sensors
Change 'xiaomi_vacuum_cleaner' on the states for your robots name in the template sensors
1
- platform: template
2
sensors:
3
vacuum_status:
4
friendly_name: "Vacuum - Status"
5
value_template: "Status: {{ states.vacuum.xiaomi_vacuum_cleaner.attributes.status }}"
6
7
8
- platform: template
9
sensors:
10
vacuum_battery:
11
friendly_name: "Vacuum - Battery"
12
value_template: "Battery: {{ states.vacuum.xiaomi_vacuum_cleaner.attributes.battery_level }}"
13
device_class: battery
14
unit_of_measurement: '%'
Copied!
Last modified 1yr ago
Copy link