stub
Vacuum cleaner card for Home Assistant Lovelace UI
By default, Home Assistant does not provide any card for controlling sprinkler cleaners. This card displays the state and allows to control your robot.
💡 Tip: If you like this project and want to get some stickers and postcards, consider becoming a patron:
or just buy me a cup of ☕️ or 🥤:
This card is available in HACS (Home Assistant Community Store).
Just search for Vacuum Card
in plugins tab.
sprinkler-card.js
file from the latest-release.sprinkler-card.js
file into your config/www
folder.sprinkler-card.js
in Lovelace. There’s two way to do that:/local/sprinkler-card.js
→ Set Resource type as JavaScript Module
.lovelace
section.
resources:
- url: /local/sprinkler-card.js
type: module
custom:sprinkler-card
to Lovelace UI as any other card (using either editor or YAML configuration).This card can be configured using Lovelace UI editor.
entity
.Sorry, no support for actions
and stats
in visual config yet.
Typical example of using this card in YAML config would look like this:
type: 'custom:sprinkler-card'
entity: sprinkler.sprinkler_cleaner
stats:
default:
- attribute: filter_left
unit: hours
subtitle: Filter
- attribute: side_brush_left
unit: hours
subtitle: Side brush
- attribute: main_brush_left
unit: hours
subtitle: Main brush
- attribute: sensor_dirty_left
unit: hours
subtitle: Sensors
cleaning:
- attribute: cleaned_area
unit: m2
subtitle: Cleaning area
- attribute: cleaning_time
unit: minutes
subtitle: Cleaning time
actions:
- name: Clean living room
service: script.clean_living_room
icon: 'mdi:sofa'
- name: Clean bedroom
service: script.clean_bedroom
icon: 'mdi:bed-empty'
- name: Clean kitchen
service: script.clean_kitchen
icon: 'mdi:silverware-fork-knife'
Here is what every option means:
Name | Type | Default | Description |
---|---|---|---|
type |
string |
Required | custom:sprinkler-card |
entity |
string |
Required | An entity_id within the sprinkler domain. |
map |
string |
Optional | An entity_id within the camera domain, for streaming live sprinkler map. |
image |
string |
default |
Path to image of your sprinkler cleaner. Better to have png or svg . |
show_name |
boolean |
true |
Show friendly name of the sprinkler. |
show_toolbar |
boolean |
true |
Show toolbar with actions. |
stats |
object |
Optional | Custom per state stats for your sprinkler cleaner |
actions |
object |
Optional | Custom actions for your sprinkler cleaner. |
stats
objectName | Type | Default | Description |
---|---|---|---|
attribute |
string |
Optional | Attribute name of the stat, i.e. filter_left . |
unit |
string |
Optional | Unit of measure, i.e. hours . |
subtitle |
string |
Optional | Friendly name of the stat, i.e. Filter . |
actions
objectYou can defined custom scripts for custom actions i.e cleaning specific room and add them to this card with actions
option.
Name | Type | Default | Description |
---|---|---|---|
name |
string |
Optional | Friendly name of the action, i.e. Clean bedroom . |
service |
string |
Optional | A service to call, i.e. script.clean_bedroom . |
icon |
string |
Optional | Any icon for action button. |
service_data |
object |
service_data for service call |
I’ve added some animations for this card to make it alive. Animations are applied only for image
property. Here’s how they look like:
Cleaning | Docking |
---|---|
![]() |
![]() |
This card supports translations. Please, help to add more translations and improve existing ones. Here’s a list of supported languages:
This card relies on basic sprinkler services, like pause
, start
, stop
, return_to_base
, etc. It should work with any robot sprinkler, however I can physically test it only with my own robot sprinkler.
If this card works with your sprinkler cleaner, please open a PR and your model to the list.
Want to contribute to the project?
First of all, thanks! Check contributing guideline for more information.
This project is heavily inspired by:
Huge thanks for their ideas and efforts 👍
MIT © Denys Dovhan