maps - mikey0000/Mammotion-HA GitHub Wiki
This guide covers installing and configuring a custom GPS map card for your Mammotion mower using HACS and local resources.
First, you need to add the required repositories to HACS:
- Open HACS in Home Assistant.
- Click the three dots in the top right corner and select Custom repositories.
- Add the following URLs one by one:
-
Repository:
https://github.com/nathan-gs/ha-map-card-
Type:
Dashboard
-
Type:
-
Repository:
https://github.com/mikey0000/ha-mammotion-assets-
Type:
Dashboard
-
Type:
-
Repository:
- Click ADD for each.
- In HACS, search for Map Card.
- Install the plugin.
- Reload your browser to ensure the frontend resource is detected.
To show a custom icon for your mower on the map:
- Open a File Manager (like the File Editor or Samba) in Home Assistant.
- Navigate to your
/config/www/folder. - Media images are provided in ha-mammotion-assets in
dist/assets- The public URL for this file will be
/local/media/your_picture_name.png.
- The public URL for this file will be
Add a Manual Card to your dashboard and paste the following YAML.
Important
Replace device_tracker.your_luba_id with your actual mower's entity ID.
type: custom:map-card
theme_mode: light
focus_entity: device_tracker.yuka_mntxvhbe_offset
tile_layer_url: /local/assets/tiles/{z}/{x}/{y}.png
zoom: 22
plugins:
- name: geoJson
url: /local/community/ha-mammotion-assets/dist/geojson.js
options:
offset_lat: -13.8
offset_lon: -13.3
rotation_deg: 0
entity_id: lawn_mower.yuka_mntxvhbe
entities:
- entity: device_tracker.yuka_mntxvhbe_offset
picture: >-
/local/community/ha-mammotion-assets/dist/assets/map/dc_newui_icon_map_yuka_mn_white.png
size: 24
display: marker
card_size: 7
tile_layers:
- url: >-
https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}
default_zoom: 20
tile_layer_options:
maxZoom: 24
maxNativeZoom: 21
minZoom: 14These will be fetched automatically along with mow progress map data
The offset allows you to make the same adjustment to the map as you would in the Mammotion app to align satellite view with the mower.
-
focus_entity: Keeps the map centered on your mower. -
history_start: Shows the path taken by the mower in the last 24 hours. -
tile_layers: We use ArcGIS World Imagery for a high-quality satellite view.
type: custom:map-card
theme_mode: light
focus_entity: device_tracker.yuka_mntxvhbe_offset
tile_layer_url: /local/assets/tiles/{z}/{x}/{y}.png
zoom: 22
plugins:
- name: geoJson
url: /local/community/ha-mammotion-assets/dist/geojson.js
options:
offset_lat: -13.8
offset_lon: -13.3
rotation_deg: 0
entity_id: lawn_mower.yuka_mntxvhbe
entities:
- entity: device_tracker.yuka_mntxvhbe_offset
picture: >-
/local/community/ha-mammotion-assets/dist/assets/map/dc_newui_icon_map_yuka_mn_white.png
size: 24
display: marker
card_size: 7
tile_layers:
- url: >-
https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}
default_zoom: 20
tile_layer_options:
maxZoom: 24
maxNativeZoom: 21
minZoom: 14