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:
- type: picture-elements
image: /local/vacuum_card.jpg
elements:
- type: icon
icon: mdi:bell-ring
tap_action:
action: call-service
service: vacuum.locate
service_data:
entity_id: vacuum.xiaomi_vacuum_cleaner
style:
top: 80%
left: 80%
"--paper-item-icon-color": rgb(115, 122, 130)
- type: icon
icon: mdi:home
tap_action:
action: call-service
service: vacuum.return_to_base
service_data:
entity_id: vacuum.xiaomi_vacuum_cleaner
style:
top: 80%
left: 65%
"--paper-item-icon-color": rgb(115, 122, 130)
- type: icon
icon: mdi:play
tap_action:
action: call-service
service: vacuum.start
service_data:
entity_id: vacuum.xiaomi_vacuum_cleaner
style:
top: 80%
left: 50%
"--paper-item-icon-color": rgb(115, 122, 130)
- type: icon
icon: mdi:pause
tap_action:
action: call-service
service: vacuum.pause
service_data:
entity_id: vacuum.xiaomi_vacuum_cleaner
style:
top: 80%
left: 35%
"--paper-item-icon-color": rgb(115, 122, 130)
- type: icon
icon: mdi:stop
tap_action:
action: call-service
service: vacuum.stop
service_data:
entity_id: vacuum.xiaomi_vacuum_cleaner
style:
top: 80%
left: 20%
"--paper-item-icon-color": rgb(155, 122, 130)
- type: state-label
entity: sensor.vacuum_status
style:
top: 10%
left: 5%
color: rgb(255, 255, 255)
transform: translate(0%,-50%)
pointer-events: none
text-shadow: 1px 1px black
font-family: Trebuchet MS
font-size: 90%
font-weight: bold
border-left-style: solid
border-color: rgb(34, 154, 210)
background-color: rgb(54, 65, 78)
opacity: 0.8
- type: state-label
entity: sensor.vacuum_battery
style:
top: 10%
right: 5%
color: rgb(255, 255, 255)
transform: translate(0%,-50%)
pointer-events: none
text-shadow: 1px 1px black
font-family: Trebuchet MS
font-size: 90%
font-weight: bold
border-right-style: solid
border-color: rgb(34, 154, 210)
background-color: rgb(54, 65, 78)
opacity: 0.8
Here is the package for the sensors
Change 'xiaomi_vacuum_cleaner' on the states for your robots name in the template sensors
- platform: template
sensors:
vacuum_status:
friendly_name: "Vacuum - Status"
value_template: "Status: {{ states.vacuum.xiaomi_vacuum_cleaner.attributes.status }}"
- platform: template
sensors:
vacuum_battery:
friendly_name: "Vacuum - Battery"
value_template: "Battery: {{ states.vacuum.xiaomi_vacuum_cleaner.attributes.battery_level }}"
device_class: battery
unit_of_measurement: '%'
Last updated