Landroid mower card for Home Assistant Lovelace UI
- Landroid Cloud integration version 4 or above, If you use Landroid Cloud integration version less than 4, you can install Landroid Card version 0.3.2
- Please enable sensors at least
sensor.[mower_name]_rssi
,sensor.[mower_name]_total_worktime
andsensor.[mower_name]_battery
for correct work. - To view the sensor values, you must enable them in the device settings. Most of them are disabled by default
First, you need to install the Landroid Cloud Integration.
Install using HACS or follow this guide.
You can manually add this repository to your HACS installation. Here is the manual process.
If you prefer not to use HACS, you can manually install the card:
-
Download all
js
files from the latest release. -
Place them into your
config/www
folder. -
Add a reference to
landroid-card.js
in Lovelace. There are two ways to do this:-
Using the UI:
-
Navigate to the Resources page by following the link below:
Or go to "Settings" → "Dashboards" → then click on 3 dots in top right corner and choose "Resources".
-
Click the 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 the following code to the
lovelace
section.resources: - url: /local/landroid-card.js type: module
-
-
Add
custom:landroid-card
to Lovelace UI as you would with any other card (using either the editor or YAML configuration).
This card can be configured using the Lovelace UI editor.
- In Lovelace UI, click the three dots in the top left corner.
- Click Configure UI.
- Click the Plus button to add a new card.
- Find Custom: Landroid Card in the list.
- Choose an
entity
. - You should now see a preview of the card!
Sorry, there is no support for actions
, shortcuts
, and stats
in visual config yet.
A typical example of using this card in a YAML configuration would look like this:
image: default
compact_view: false
show_status: true
show_name: true
show_toolbar: true
type: custom:landroid-card
entity: lawn_mower.mower
stats:
default:
- entity_id: sensor.mower_blades_total_on_time
subtitle: Total blade time
value_template: '{{ as_timedelta((value | float(0) * 3600) | string) }}'
- entity_id: sensor.mower_blades_current_on_time
subtitle: Current blade time
value_template: '{{ as_timedelta((value | float(0) * 3600) | string) }}'
- entity_id: sensor.mower_total_worktime
subtitle: Work time
value_template: '{{ as_timedelta((value | float(0) * 3600) | string ) }}'
- entity_id: sensor.mower_distance_driven
value_template: '{{ (value | float(0) / 1000) | round(3) }}'
unit: km
subtitle: Distance
mowing:
- entity_id: sensor.mower_yaw
subtitle: Yaw
unit: °
- entity_id: sensor.mower_roll
subtitle: Roll
unit: °
- entity_id: sensor.mower_pitch
subtitle: Pitch
unit: °
shortcuts:
- name: Notification
service: automation.toggle
icon: mdi:bell
service_data:
entity_id: automation.mower_notify_status
Here is an explanation of each option:
Name | Type | Default | Description |
---|---|---|---|
type |
string |
custom:landroid-card |
Type of the card custom:landroid-card |
entity |
string |
Required | An entity_id within the lawn_mower domain. |
camera |
string |
Optional | An entity_id within the camera domain, for streaming the live Landroid camera. |
camera_refresh |
integer |
5 |
Update interval for the camera in seconds |
image |
string |
default |
Path to an image of your mower. It's better to use png or svg formats. |
image_size |
integer |
4 |
Image size. It's an integer from 1 to 8. Each unit is equal to 50px (e.g., 2 * 50px = 100px ) |
image_left |
boolean |
false |
Show the image on the left side. |
show_name |
boolean |
false |
Show the friendly name of the mower. |
show_status |
boolean |
true |
Show the status of the mower. |
show_toolbar |
boolean |
true |
Show the toolbar with actions. |
compact_view |
boolean |
false |
Use a compact view without an 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 the mower or even any entity by entity_id
to display in the stats section:
Name | Type | Description |
---|---|---|
entity_id |
string |
An entity_id with a state, e.g., sensor.mower . |
attribute |
string |
The attribute name of the stat, e.g., total_blade_time . |
value_template |
string |
Jinja2 template returning a value. Here is Home Assistant Templating. The value variable represents the entity_id or attribute state, e.g., "{{ as_timedelta((value | float(0) * 60) | string) }}" |
unit |
string |
The unit of measure, e.g., hours . |
subtitle |
string |
The friendly name of the stat, e.g., Blade time . |
stats:
default:
- entity_id: sensor.mower_blades_total_on_time
subtitle: Total blade time
value_template: '{{ as_timedelta((value | float(0) * 3600) | string) }}'
- entity_id: sensor.mower_blades_current_on_time
subtitle: Current blade time
value_template: '{{ as_timedelta((value | float(0) * 3600) | string) }}'
- entity_id: sensor.mower_total_worktime
subtitle: Work time
value_template: '{{ as_timedelta((value | float(0) * 3600) | string ) }}'
- entity_id: sensor.mower_distance_driven
value_template: '{{ (value | float(0) / 1000) | round(3) }}'
unit: km
subtitle: Distance
mowing:
- entity_id: sensor.mower_yaw
subtitle: Yaw
unit: °
- entity_id: sensor.mower_roll
subtitle: Roll
unit: °
- entity_id: sensor.mower_pitch
subtitle: Pitch
unit: °
You can define service invocations to override default actions behavior. Available actions to override are start_mowing
, edgecut
, pause
and dock
.
Name | Type | Description |
---|---|---|
service |
string |
A service to call, e.g., script.mowing_zone_2 . |
service_data |
object |
service_data for the service call |
actions:
start_mowing:
service: script.mowing_zone_2
edgecut:
service: landroid_cloud.setzone
service_data:
entity_id: lawn_mower.mower
zone: '1'
pause:
service: landroid_cloud.ots
service_data:
entity_id: lawn_mower.mower
boundary: true
runtime: 60
You can define custom scripts for custom actions, such as mowing a zone, and add them to this card with the shortcuts
option.
Name | Type | Description |
---|---|---|
name |
string |
The friendly name of the action, e.g., Mowing a zone 2 . |
service |
string |
A service to call, e.g., script.mowing_zone_2 . |
icon |
string |
Any icon for the action button. |
service_data |
object |
service_data for the 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 |
---|---|---|
--lc-background |
var(--ha-card-background, var(--card-background-color, white)) |
Background of the card |
--lc-primary-text-color |
var(--primary-text-color) |
Mower name, stats values, etc |
--lc-secondary-text-color |
var(--secondary-text-color) |
Status, stats units and titles, etc |
--lc-icon-color |
var(--secondary-text-color) |
Colors of icons |
--lc-toolbar-background |
var(--lc-background) |
Background of the toolbar |
--lc-toolbar-text-color |
var(--secondary-text-color) |
Color of the toolbar texts |
--lc-toolbar-icon-color |
var(--secondary-text-color) |
Color of the toolbar icons |
--lc-divider-color |
var(--entities-divider-color, var(--divider-color)) |
Color of dividers |
--lc-spacing |
10px |
Paddings and margins inside the card |
Here is an example of customization via a theme. Read more in the Frontend documentation.
my-custom-theme:
lc-background: '#17A8F4'
lc-spacing: 5px
You can use card-mod
to customize the card on a per-card basis, like this:
type: 'custom:landroid-card'
style: |
ha-card {
--lc-background: #17A8F4;
--lc-spacing: 5px;
}
...
💡 Tip: Animations are applied only to the image
property. Here's how they look:
Mowing | Docking |
---|---|
This card supports translations. Please help add more translations and improve existing ones. Here's a list of supported languages:
-
Čeština (Czech)
-
Dansk (Danish)
-
Deutsch (German)
-
English
-
Estonian
-
Français (French)
-
Italiano (Italian)
-
Nederlands (Dutch)
-
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 lawnmowers; however, I can physically test it only with my own Worx Landroid M500 WR141E.
If this card works with your lawnmower, please open a PR and add your model to the list.
Vendor | Model | Name | Max. Rain Delay |
---|---|---|---|
Worx | WR130E | Landroid S300 | 23 hr 30 min |
Worx | WR141E | Landroid M500 | 12 hr 30 min |
Worx | WR143E | Landroid M1000 | |
Worx | WR147E | Landroid L1000 | |
Worx | WR155E | Landroid L2000 | 23 hr 30 min |
Worx | WR165E | Landroid M500 Plus | 23 hr 30 min |
Worx | WR167E | Landroid M700 Plus | 23 hr 30 min |
Worx | WR105SI | Landroid S500 | |
Worx | WR206E | Landroid M600 | |
Kress | Mission | KR112 | 12 hr 00 min |
Your mower? |
If services and the app have stopped working:
- Go to My Landroids.
- Unlink your Landroid.
- Open the app on a mobile device.
- Add your Landroid again.
Want to contribute to the project?
First of all, thanks! Check the contributing guidelines 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 👍
Please see the list of contributors who participated in this project.
💡 Tip: If you like this project just buy me a cup of ☕️ or 🥤: