dorkhub

landroid-card

Landroid mower card for Home Assistant Lovelace UI

Barma-lej
JavaScript14377 forksMITupdated 1 day ago
git clone https://github.com/Barma-lej/landroid-card.gitBarma-lej/landroid-card

Landroid Card

HACS Latest release All releases Latest release GitHub License Community Forum Buy Me A Coffee

🌿 Landroid mower card for Home Assistant Lovelace UI

Live preview of landroid-card

Requirements

  • A Home Assistant integration providing a lawn_mower entity (see Compatible integrations below).
  • To view sensor values, you must enable them in the device settings — most are disabled by default.

Compatible integrations

Landroid Card works with any Home Assistant integration that exposes a lawn_mower entity. Auto-discovery of battery, info, and statistics sensors works best when the integration follows Landroid Cloud translation key conventions (see src/constants.js). For other integrations, a device_class-based fallback is used automatically.

Integration Vendor / Models Notes
Landroid Cloud by MTrab Worx, Kress, Landxcape Full support, version 7+ required
Worx Landroid Vision PLUS by ADNPolymerase Worx Landroid Vision / Vision Cloud / RTK Community integration, compatible

Is your integration missing? Open a PR or issue!

Installation

HACS

Since this card is available in the HACS default store, you can install it directly:

  1. Open HACS in your Home Assistant.
  2. Go to Frontend.
  3. Search for Landroid Card and click on it.
  4. Click Download.

Or use this button for a quick install:

Open your Home Assistant instance and open a repository inside the Home Assistant Community Store.

Manual

Do not use this method if you have already installed the card via HACS!

If you prefer not to use HACS, you can manually install the card:

  1. Download all js files from the latest release.

  2. Place them into your config/www folder.

  3. Add a reference to landroid-card.js in Lovelace. There are two ways to do this:

    1. Using the UI:

      • Navigate to the Resources page by following the link below: Open your Home Assistant instance and show your resources.

        Or go to SettingsDashboards → click the three dots in the top right corner and choose Resources.

      • Click the Plus button.

      • Set URL to /local/landroid-card.js.

      • Set Resource type to JavaScript Module.

      Note: If you do not see the Resources tab, you need to enable Advanced Mode in your User Profile.

    2. Using YAML: Add the following code to the lovelace section:

      resources:
        - url: /local/landroid-card.js
          type: module
  4. Add custom:landroid-card to Lovelace UI as you would with any other card (using either the editor or YAML configuration).

Migrating from Landroid Cloud 6

If you are upgrading from an older version of this card (v1.x / Landroid Cloud 6):

  1. Update Landroid Cloud integration to version 7+
  2. Change your main entity from vacuum.mowerlawn_mower.mower
  3. Rename settings:settings_card: in your card config (old key still works)
  4. Update shortcuts and actions to the new action object format (see Shortcuts)

Entities in info_card, battery_card, statistics_card and settings_card are now auto-discovered from the device — you can remove manual lists unless you want to override the order.

Usage

This card can be configured using the Lovelace UI editor.

  1. In Lovelace UI, click the three dots in the top left corner.
  2. Click Configure UI.
  3. Click the Plus button to add a new card.
  4. Find Custom: Landroid Card in the list.
  5. Choose an entity.
  6. You should now see a preview of the card! 🎉

Note: actions, shortcuts, and stats are not yet supported in the visual editor — use the YAML/Code editor for these options.

The visual editor is organized into tabs: General, Battery 🔋, Info ℹ️, Statistics 📊, and Settings ⚙️. Entity order within each tab can be changed by drag & drop.

A typical example of using this card in YAML configuration:

type: custom:landroid-card
entity: lawn_mower.mower
# camera: camera.mower_camera   # optional
# camera_view: live             # optional: 'auto' | 'live'
# camera_controls: false        # optional
# camera_muted: true            # optional
image: default
image_size: '4'
show_animation: true
show_edgecut: true
show_status: true
show_toolbar: true
shortcuts:
  - name: Notification
    icon: mdi:bell
    action:
      action: perform-action
      perform_action: automation.toggle
      target:
        entity_id: automation.mower_notify_status
stats:
  default:
    - entity_id: sensor.mower_blades_total_on_time
      subtitle: Total blade time
      value_template: '{{ as_timedelta((value | float(0) * 3600) | round(0) | string) }}'
    - entity_id: sensor.mower_blades_current_on_time
      subtitle: Current blade time
      value_template: '{{ as_timedelta((value | float(0) * 3600) | round(0) | string) }}'
    - entity_id: sensor.mower_total_worktime
      subtitle: Work time
      value_template: '{{ as_timedelta((value | float(0) * 3600) | round(0) | 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: °

Here is an explanation of each option:

Name Type Default Description
type string custom:landroid-card Type of the card — must be 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 displaying the live camera stream
camera_view string auto Camera stream mode: auto (let HA decide) or live (force live stream)
camera_controls boolean false Show video playback controls on the camera stream
camera_muted boolean true Mute audio in the camera stream
image string default Path to an image of your mower. Use png or svg formats for best results
image_size integer 4 Image size — an integer from 1 to 8, where each unit equals 50 px (e.g., 2 → 100 px)
image_left boolean false Show the image on the left side
show_animation boolean true Show image animation while mowing or returning
show_edgecut boolean true Show the edgecut button on the toolbar
show_name boolean false Show the friendly name of the mower
show_status boolean true Show the current status of the mower
show_toolbar boolean true Show the toolbar with action buttons
compact_view boolean false Use a compact view without an image
settings_card object Optional List of configuration entities shown when the ⚙️ button is clicked. Leave empty for auto-discovery from the device's config category. Replaces deprecated settings.
battery_card object Optional List of entities shown when the 🔋 button is clicked at the top right corner of the card. Leave empty to use defaults
info_card object Optional List of entities shown when the 🛜 button is clicked at the top left corner of the card. Leave empty to use defaults
statistics_card object Optional List of entities shown when the ⌚ button is clicked at the top middle of the card. Leave empty to use defaults
stats object Optional Custom per-state stats displayed below the mower image
actions object Optional Override default toolbar button actions with custom service calls
shortcuts object Optional List of custom shortcut buttons shown at the bottom right of the card

settings_card object

Defines which configuration entities are shown when the ⚙️ button is clicked at the bottom of the card. You can find available entities in your device's Configuration section.

Note: If settings_card is not specified, entities with config category are discovered automatically. The old settings key still works as a fallback.

settings_card:
  - switch.mower_party_mode
  - switch.mower_locked
  - number.mower_raindelay
  - number.mower_time_extension
  - number.mower_torque
  - select.mower_current_zone
  - button.mower_start_cutting_edge
  - button.mower_restart_baseboard

battery_card, info_card, statistics_card objects

Defines which entities are shown when the tip buttons are clicked at the top of the card.

Note: These lists are optional. If not specified, the card automatically detects the relevant entities from your device using translation_key. Specify them only if you want to override the defaults or change the order.

To remove an entity from a card in the visual editor, simply clear its field — the card will revert to automatic detection.

battery_card:
  - sensor.mower_battery
  - sensor.mower_battery_temperature
  - sensor.mower_battery_voltage
  - sensor.mower_battery_charge_cycles

info_card:
  - sensor.mower_rssi
  - sensor.mower_serial_number
  - update.mower_firmware

statistics_card:
  - sensor.mower_total_worktime
  - sensor.mower_blades_total_on_time
  - sensor.mower_blades_current_on_time
  - sensor.mower_distance_driven

stats object

You can use any mower attribute or 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 to display, e.g., total_blade_time
value_template string Jinja2 template returning a value. See Home Assistant Templating. The value variable represents the state of entity_id or attribute, e.g., "{{ as_timedelta((value | float(0) * 60) | string) }}"
unit string Unit of measure, e.g., hours
subtitle string Friendly label for 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: °

actions object

Override the default behavior of toolbar buttons. Available keys: start_mowing, edgecut, pause, dock.

Name Type Description
perform_action string An action to call, e.g., script.mowing_zone_2
target object Target for the action call
data object Optional data payload
actions:
  start_mowing:
    action: perform-action
    perform_action: script.mowing_zone_2
  edgecut:
    action: perform-action
    perform_action: landroid_cloud.setzone
    target:
      entity_id: lawn_mower.mower
    data:
      zone: '1'

shortcuts object

Add custom shortcut buttons to the toolbar using any Home Assistant action.

Name Type Description
name string Friendly name of the shortcut, e.g., Mow zone 2
icon string Any MDI icon, e.g., mdi:bell
action object A Home Assistant action object (see examples below)
shortcuts:
  # perform-action (recommended)
  - name: Notification
    icon: mdi:bell
    action:
      action: perform-action
      perform_action: automation.toggle
      target:
        entity_id: automation.mower_notify_status

  # navigate to a dashboard view
  - name: Garden
    icon: mdi:flower
    action:
      action: navigate
      navigation_path: /lovelace/garden

  # open a URL
  - name: Manual
    icon: mdi:book-open
    action:
      action: url
      url_path: https://worx.com/manual.pdf

  # open more-info dialog
  - name: Mower info
    icon: mdi:information
    action:
      action: more-info
      entity: lawn_mower.mower

Note: The old service / service_data format is still accepted for backward compatibility but will be removed in a future release.

Theming 🎨

This card can be styled by changing the values of these CSS variables (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) Color of icons
--lc-toolbar-background var(--lc-background) Background of the toolbar
--lc-toolbar-text-color var(--secondary-text-color) Color of toolbar text
--lc-toolbar-icon-color var(--secondary-text-color) Color of toolbar icons
--lc-divider-color var(--entities-divider-color, var(--divider-color)) Color of dividers
--lc-spacing 10px Padding and margin inside the card

Styling via a theme

Read more in the Frontend documentation.

my-custom-theme:
  lc-background: '#17A8F4'
  lc-spacing: 5px

Styling via card-mod

type: 'custom:landroid-card'
style: |
  ha-card {
    --lc-background: #17A8F4;
    --lc-spacing: 5px;
  }

Animations 🎬

Animations are applied only to the image property. Here's how they look:

Mowing Docking
Mowing animation Returning animation

Supported languages 🌍

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

  • Español (Spanish)

  • Eesti (Estonian)

  • Français (French)

  • Italiano (Italian)

  • Magyar (Hungarian)

  • Nederlands (Dutch)

  • Polski (Polish)

  • Русский (Russian)

  • Slovenščina (Slovenian)

  • Svenska (Swedish)

  • Your language?

If your lawnmower has been banned 🚫

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.

Development 🛠️

Want to contribute to the project?

First of all, thanks! 🙏 Check the contributing guidelines for more information.

Inspiration

This project is heavily inspired by:

Huge thanks for their ideas and efforts 👍

Thanks to all contributors 🤝

Please see the list of contributors who participated in this project.

License

MIT License

💡 Tip: If you like this project, buy me a cup of ☕️ or 🥤:

Buy Me A Coffee

more like this

esphome_modbus_bridge

ESPHome Modbus TCP↔RTU Bridge – Transparent bridge for ESP8266/ESP32 that lets multiple Modbus TCP clients communicate…

C++53

ESPGeiger

☢️ ESP8266 / ESP32 Firmware for collecting and reporting statistics from Geiger counters

C++53

search

search projects, people, and tags