Landroid mower card for Home Assistant Lovelace UI
By default, Home Assistant does not provide any card for controlling Landroid lawnmower. This card displays the state and allows to control your robot.
First of all you need to install a Landroid Cloud Integration.
Install using HACS or see this guide.
You can manual add this repo to your HACS installation. Here is manual
If you won't to use HACS method, you can manual install the card
-
Download
landroid-card.js
file from the latest release. -
Put
landroid-card.js
file into yourconfig/www
folder. -
Add reference to
landroid-card.js
in Lovelace. There's two way to do that:-
Using UI:
-
This is done by navigating to the Resources page by following below link:
Or go to Configuration → Lovelace Dashboards → Resources Tab
-
Click Plus button
-
Set Url as
/local/landroid-card.js
-
Set Resource type as
JavaScript Module
.
Note: If you do not see the Resources Tab, you will need to enable Advanced Mode in your User Profile
-
-
Using YAML: Add following code to
lovelace
section.resources: - url: /local/landroid-card.js type: module
-
-
Add
custom:landroid-card
to Lovelace UI as any other card (using either editor or YAML configuration).
This card can be configured using Lovelace UI editor.
- In Lovelace UI, click 3 dots in top left corner.
- Click Configure UI.
- Click Plus button to add a new card.
- Find Custom: Landroid Card in the list.
- Choose
entity
. - Now you should see the preview of the card!
Sorry, no support for actions
, shortcuts
and stats
in visual config yet.
Typical example of using this card in YAML config would look like this:
image: default
compact_view: false
show_status: true
show_name: true
show_toolbar: true
type: custom:landroid-card
entity: vacuum.mower
stats:
default:
- attribute: blades.total_on
subtitle: Total blade time
value_template: '{{ as_timedelta((value | float(0) * 60) | string) }}'
- attribute: blades.current_on
subtitle: Current blade time
value_template: '{{ as_timedelta((value | float(0) * 60) | string) }}'
- attribute: statistics.worktime_blades_on
subtitle: Work time
value_template: '{{ as_timedelta((value | float(0) * 60) | string) }}'
- attribute: statistics.distance
value_template: '{{ (value | float(0) / 1000) | round(3) }}'
unit: km
subtitle: Distance
mowing:
- attribute: orientation.yaw
subtitle: Yaw
unit: °
- attribute: orientation.roll
subtitle: Roll
unit: °
- attribute: orientation.pitch
subtitle: Pitch
unit: °
shortcuts:
- name: Notification
service: automation.toggle
icon: mdi:bell
service_data:
entity_id: automation.mower_notify_status
Here is what every option means:
Name | Type | Default | Description |
---|---|---|---|
type |
string |
Required | custom:landroid-card |
entity |
string |
Required | An entity_id within the vacuum domain. |
camera |
string |
Optional | An entity_id within the camera domain, for streaming live landroid camera. |
camera_refresh |
integer |
5 |
Update interval for camera in seconds |
image |
string |
default |
Path to image of your mower. Better to have png or svg . |
show_name |
boolean |
true |
Show friendly name of the mower. |
show_status |
boolean |
true |
Show status of the mower. |
show_toolbar |
boolean |
true |
Show toolbar with actions. |
compact_view |
boolean |
false |
Compact view without image. |
stats |
object |
Optional | Custom per state stats for your mower |
actions |
object |
Optional | Override default actions behavior with service invocations. |
shortcuts |
object |
Optional | List of shortcuts shown at the right bottom part of the card with custom actions for your mower. |
You can use any attribute of mower or even any entity by entity_id
to display by stats section:
Name | Type | Default | Description |
---|---|---|---|
entity_id |
string |
Optional | An entity_id with state, i.e. sensor.mower . |
attribute |
string |
Optional | Attribute name of the stat, i.e. total_blade_time . |
value_template |
string |
Optional | Jinja2 template returning a value Here is Home Assistant Templating. value variable represents the entity_id or attribute state, i.e. "{{ as_timedelta((value | float(0) * 60) | string) }}" |
unit |
string |
Optional | Unit of measure, i.e. hours . |
subtitle |
string |
Optional | Friendly name of the stat, i.e. Blade time . |
stats:
default:
- attribute: blades.total_on
subtitle: Total blade time
value_template: '{{ as_timedelta((value | float(0) * 60) | string) }}'
- attribute: blades.current_on
subtitle: Current blade time
value_template: '{{ as_timedelta((value | float(0) * 60) | string) }}'
- attribute: statistics.worktime_blades_on
subtitle: Work time
value_template: '{{ as_timedelta((value | float(0) * 60) | string) }}'
- attribute: statistics.distance
value_template: '{{ (value | float(0) / 1000) | round(3) }}'
unit: km
subtitle: Distance
mowing:
- attribute: orientation.yaw
subtitle: Yaw
unit: °
- attribute: orientation.roll
subtitle: Roll
unit: °
- attribute: orientation.pitch
subtitle: Pitch
unit: °
You can defined service invocations to override default actions behavior. Available actions to override are start
, pause
, resume
, stop
and return_to_base
.
Name | Type | Default | Description |
---|---|---|---|
service |
string |
Optional | A service to call, i.e. script.mowing_zone_2 . |
service_data |
object |
service_data for service call |
actions:
start:
service: script.mowing_zone_2
edgecut:
service: landroid_cloud.setzone
service_data:
entity_id: vacuum.mower
zone: '1'
pause:
service: landroid_cloud.ots
service_data:
entity_id: vacuum.mower
boundary: true
runtime: 60
You can defined custom scripts for custom actions i.e mowing a zone and add them to this card with shortcuts
option.
Name | Type | Default | Description |
---|---|---|---|
name |
string |
Optional | Friendly name of the action, i.e. Mowing a zone 2 . |
service |
string |
Optional | A service to call, i.e. script.mowing_zone_2 . |
icon |
string |
Optional | Any icon for action button. |
service_data |
object |
service_data for service call |
shortcuts:
- name: Notification
service: automation.toggle
icon: mdi:bell
service_data:
entity_id: automation.mower_notify_status
This card can be styled by changing the values of these CSS properties (globally or per-card via card-mod
):
Variable | Default value | Description |
---|---|---|
--vc-background |
var(--ha-card-background, var(--card-background-color, white)) |
Background of the card |
--vc-primary-text-color |
var(--primary-text-color) |
Mower name, stats values, etc |
--vc-secondary-text-color |
var(--secondary-text-color) |
Status, stats units and titles, etc |
--vc-icon-color |
var(--secondary-text-color) |
Colors of icons |
--vc-toolbar-background |
var(--vc-background) |
Background of the toolbar |
--vc-toolbar-text-color |
var(--secondary-text-color) |
Color of the toolbar texts |
--vc-toolbar-icon-color |
var(--secondary-text-color) |
Color of the toolbar icons |
--vc-divider-color |
var(--entities-divider-color, var(--divider-color)) |
Color of dividers |
--vc-spacing |
10px |
Paddings and margins inside the card |
Here is an example of customization via theme. Read more in the Frontend documentation.
my-custom-theme:
vc-background: '#17A8F4'
vc-spacing: 5px
You can use card-mod
to customize the card on per-card basis, like this:
type: 'custom:landroid-card'
style: |
ha-card {
--vc-background: #17A8F4;
--vc-spacing: 5px;
}
...
💡 Tip: Animations are applied only for image
property. Here's how they look like:
Mowing | Docking |
---|---|
This card supports translations. Please, help to add more translations and improve existing ones. Here's a list of supported languages:
-
Čeština (Czech)
-
Dansk (Danish)
-
Deutsch (German)
-
English
-
Français (French)
-
Italiano (Italian)
-
Polski (Polish)
-
Русский (Russian)
-
Slovenščina (Slovenian)
-
Svenska (Swedish)
This card relies on basic landroid services, like pause
, start
, stop
, return_to_base
, etc. It should work with landroid mower, however I can physically test it only with my own Worx Landroid M500 WR141E.
If this card works with your mower, please open a PR and your model to the list.
Vendor | Model | Name | Max. Raindelay |
---|---|---|---|
Worx | WR141E | Landroid M500 | 12 hr 30 min |
Worx | WR143E | Landroid M1000 | |
Worx | WR147E | Landroid L1000 | |
Worx | WR165E | Landroid M500 Plus | 23 hr 30 min |
Your mower? |
Services and app stopped working
- Go to My Landroids
- Unlink your Landroid
- Open app on mobile device
- Add Landroid
Want to contribute to the project?
First of all, thanks! Check contributing guideline for more information.
This project is heavily inspired by:
- Malene Trab Landroid Cloud Integration
- Denys Dovhan Vacuum card
Huge thanks for their ideas and efforts 👍
MIT © Barma-lej
💡 Tip: If you like this project just buy me a cup of ☕️ or 🥤: