Skip to content

Instantly share code, notes, and snippets.

@mikey0000
Created September 5, 2024 19:53
Show Gist options
  • Save mikey0000/0cc2d7505a2e3b5fe6831688f7aa7726 to your computer and use it in GitHub Desktop.
Save mikey0000/0cc2d7505a2e3b5fe6831688f7aa7726 to your computer and use it in GitHub Desktop.
Automation sample for alerting a user when their Mammotion lawm mower is locked.
alias: Mower Locked Alert
trigger:
- platform: state
entity_id:
- sensor.luba_2_activity_mode
to: MODE_LOCK
action:
- action: notify.mobile_app_my_phone
data:
title: WARNING Mower Locked!
message: Lift sensor triggered
data:
image: /local/warning.png
channel: alarm_stream
tag: mower_alert
importance: max
visibility: public
notification_icon: mdi:robot-mower
clickAction: /home/mower
ttl: 0
priority: high
color: red
@AlohaFlyer
Copy link

This is helpful.

@a8ree
Copy link

a8ree commented Aug 16, 2025

I have a Yuka Mini and when lifted the sensor.chompy_activity_mode remains in MODE_READY
Any way I can fix this?

@mikey0000
Copy link
Author

Not sure I need to check mine, but there are error sensors now in 0.3.2

@Kolbi
Copy link

Kolbi commented Aug 19, 2025

I modified it to:

Error code:

Error code 1201: "geändert zu navigation: Roboter ist eingeschlossen, Manuelle Rettung erforderlich"

You need to look into the logs which error codes are relevant.

alias: Mower Locked Alert
description: ""
triggers:
  - trigger: numeric_state
    entity_id:
      - sensor.yuka_abc_last_error_code
    above: 1201
actions:
  - action: notify.mobile_app_
    data:
      title: WARNING Mower Locked!
      message: Lift sensor triggered
      data:
        image: /local/warning.png
        channel: alarm_stream
        tag: mower_alert
        importance: max
        visibility: public
        notification_icon: mdi:robot-mower
        clickAction: /home/mower
        ttl: 0
        priority: high
        color: red

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment