Send notification when my Xiaomi Roborock finishes vacuum?

Hi there, I’m new to Home Assistant. Very impressed so far!

I’m able to set up time-based triggers to start my Xiaomi Roborock S5 vacuum, and a time-based trigger to send me a Telegram notification.

But I’m struggling on how can I send myself a Telegram notification when my Xiaomi vacuum has finished vacuuming?

What would the Trigger be, in this case? Reading the Xiaomi Vacuum documentation doesn’t clear it up. Ideally I’d also like to be able to send Telegram notifications when starting / errors / finished.

Thank you!

A to: returning state trigger will trigger at the end of a cleaning run.

I use a catch all notification automation that sends every state change:

- id: vacuum_notifications
  alias: Vacuum Notifications
  trigger:
  - platform: state
    entity_id: vacuum.robovac_downstairs
  - platform: state
    entity_id: vacuum.robovac_upstairs
  condition:
    condition: template
    value_template: "{{ not (trigger.to_state.state == trigger.from_state.state) }}"
  action:
  - service: notify.telegram_general
    data_template:
      title: '*Information*'
      message: "{{ trigger.to_state.name }} is {{ trigger.to_state.state }}"
3 Likes

Thanks Tom,

This is brilliant - works like a charm!

I’ll need to read up on Templates. Thanks for your help!

1 Like