Estimated reading time: 8 minutes
Who hasn't experienced this? The robot vacuum starts at the scheduled time - but the mop is already finished or the water tank is empty. This can be easily automated with Home Assistant, regardless of whether you're using a new or older model. Provided there are a few sensors and values, but these are almost always available. We'll go through the whole thing using the example of my Roborock S7, which comes without a suction station or anything else.
For detailed instructions and an explanation of all configuration options, I recommend the YouTube video linked below. In this video, every single setting is explained in detail so that you receive comprehensive instructions for the exact setup. You can find any code from the video in this article so that you can use it directly without having to type it in.
Why this automation makes sense
Many robot hoovers and mops do not actively notify you when the mop needs to be changed or the water tank needs to be refilled. Older models in particular (such as the Roborock S7) do not have their own sensors for this.
But with a trick, you can let Home Assistant take over exactly these tasks - cleverly and reliably. You only have to carry out the maintenance tasks yourself, but that's not a problem.
You don't need any additional sensors or smart modules to monitor the water level. The automation uses your robot's existing status data and combines it with a simple but effective counting system. This not only lets you know immediately when the tank is empty, but also allows you to control the maintenance intervals for the mop cloth. This saves you time, improves cleaning performance and ensures that you are not surprised when the robot wipes "dry" again.
What is Home Assistant?
Home Assistant is an open source platform for home automation that aims to connect and centrally control all devices in the home. It is designed to provide a unified user interface and simple, flexible control for a variety of smart home devices from different ecosystems. Here are some points in favor of Home Assistant:
- CompatibilityHome Assistant supports thousands of devices and services from various manufacturers, including lighting, air conditioning, heating, cameras, weather sensors, voice assistants and more.
- Local controlUnlike many commercial smart home platforms that rely on cloud services, Home Assistant runs locally on your network. This means increased privacy and reliability, as your smart home devices work even without an active internet connection.
- Automation and scenesOne of the main features of Home Assistant is the ability to create complex automations and scenarios. For example, you can have lights switch on automatically when it gets dark or turn on the heating when the temperature falls below a certain level.
- Simple user interfaceHome Assistant offers a user-friendly interface that makes it easy to monitor and control devices. This interface is fully customizable.
- Integration with voice assistantsHome Assistant can be integrated with voice assistants such as Amazon Alexa or Google Assistant to enable voice-controlled control of your smart home devices.
- Open source and community-drivenSince Home Assistant is open source, it is supported by an active community that is constantly developing new integrations and improving existing ones.
- Data protection and securityAs a locally running platform, Home Assistant has the advantage that the data remains within its own network. This protects privacy and increases security compared to cloud-based solutions.
In summary, Home Assistant is a powerful and flexible solution for those who want to design their own smart home and control their devices centrally, regardless of the manufacturer or ecosystem.



How it works - step by step
🧠 Aim of this automation
This automation reliably recognizes, when the water tank of your robot vacuum is emptycounts, how often this happensand sends you timely notificationwhen it it is also time to change the wiping cloth.
This solution also works with older models, as long as they have Home Assistant correctly integrated are and Status values (such as waterShortageStatus
) transmit - for example with a Roborock S7.
🔧 Prerequisites & preparation
Before you can use this automation, a few things need to be prepared in Home Assistant:
1. vacuum robot integrated into Home Assistant
- You must have already integrated your robot vacuum into Home Assistant.
- With Roborock, for example, this can be done via Xiaomi Miio integration or Roborock.
- Important: Your device must display the sensor value
waterShortageStatus
as an attribute in thevacuum
-entity (it may have a different name on other devices, you will then have to find out the correct name).waterShortageStatus = 0
Tank fullwaterShortageStatus = 1
Tank Empty
📌 Check:
Go to Developer tools > States and search for vacuum.your_suction_robot
. Check whether waterShortageStatus
appears there as an attribute.
2. create counter for water cycles
A counter is used so that you don't have to change the wipe immediately every time the tank is empty.
🔁 Why is that?
For example, because you only every 2 water cycles want to change the wipe.
Create in configuration.yaml
or preferably via UI (helper):
counter:
vacuum cleaner wiping water cycles:
name: Vacuum cleaner wiping cycles
initial: 0
step: 1
Or in the UI under Settings > Devices & services > Helpers > Add counter.
Automation
alias: Vacuum cleaner - Water tank empty
description: Notifies when the water tank of the robot vacuum cleaner is empty
triggers:
- entity_id: vacuum.roborock_s7
attribute: waterShortageStatus
from: 0
to: 1
trigger: state
conditions: []
actions:
- action: counter.increment
metadata: {}
data: {}
target:
entity_id: counter.vacuum_cleaner_water_cycles
- if:
- condition: numeric_state
entity_id: counter.vacuum_cleaner_water_cycles
above: 1
then:
- data:
message: >-
Robot vacuum cleaner needs water. It is also time to change the
to change.
title: Change mop cloth & fill water tank
data:
icon_url: /local/icons/roborock-s7.png
notification_icon: mdi:robot-vacuum-alert
channel: Emergency
priority: high
ttl: 0
color: red
persistent: true
action: notify.smartphones
- action: counter.reset
metadata: {}
data: {}
target:
entity_id: counter.vacuum_cleaner_water_cycles
else:
- data:
message: Robot vacuum cleaner needs water.
title: Fill water tank
data:
icon_url: /local/icons/roborock-s7.png
notification_icon: mdi:robot-vacuum-alert
channel: Emergency
priority: high
ttl: 0
color: red
persistent: true
action: notify.smartphones
mode: single
What does this automation do?
It automatically recognizes when your robot hoover has run out of water, counts how often this happens and reminds you to refill the water tank - and to change the mop cloth after several passes.
How does Home Assistant recognize an empty tank?
The automation reacts to the attribute waterShortageStatus
. If this changes from 0 to 1, Home Assistant knows that the tank is empty. This works with many models, e.g. the Roborock S7.
What happens after triggering?
As soon as the tank is empty, an internal counter is incremented by one. This counter keeps track of how often you have already refilled without changing the wipe.
What notifications do you receive?
- Is it the first timeyou will receive a simple message: "Fill water tank".
- At the second time you will also be reminded to change the wipe. This message is visually highlighted - with an icon, high priority and red color.
What happens afterwards?
After the second reminder, the counter is automatically reset. The next time, the count starts again from the beginning.
What do you need to prepare?
- Your robot must be integrated in Home Assistant and have the attribute
waterShortageStatus
transmit. - You need a counter helper, e.g. "vacuum cleaner water cycles".
- You need a notification system set up, e.g. via smartphone app.
🚀 Extension ideas
Here are a few ideas on how you can improve automation:
- 🗣️ Voice output via Alexa or Google Home:
→ Via "Alexa Media Player" integration with TTS message. - 🖥️ Lovelace widget with level indicator (estimated):
→ Display of the counter reading as a progress bar. - ⏱️ Time restriction:
→ Only send notifications between 8 a.m. and 10 p.m. - 🔄 Trigger automation manually when changing wipes:
→ Reset the counter manually with a button.
Bonus: Empty dust bin notification
alias: Vacuum cleaner - Empty dust bin
description: Sends a message when >250m² have been cleaned since last emptying
triggers:
- entity_id: sensor.cleaning_since_last_emptying
above: 250
trigger: numeric_state
actions:
- data:
message: Robot vacuum cleaner should be emptied after 250m².
title: Empty dust container
data:
icon_url: /local/icons/roborock-s7.png
notification_icon: mdi:robot-vacuum-alert
channel: Emergency
priority: high
ttl: 0
color: red
persistent: true
action: notify.smartphones
- delay:
hours: 10
minutes: 0
seconds: 0
milliseconds: 0
- data:
entity_id: input_number.last_empty_value
value: "{{ states('sensor.roborock_s7_total_clean_area') | float }}"
action: input_number.set_value
mode: single
This automation is designed to remind you to empty the robot vacuum's dust bin as soon as it has cleaned more than 250 m² since the last time it was emptied.
It starts automatically when the sensor sensor.cleaning_since_last_emptying
displays a value above 250. At this moment, a notification is sent to your smartphones with the title "Empty dust bin" and the message "Robot vacuum cleaner should be emptied after 250 m²". In addition, a matching icon is displayed, the notification is sent in an emergency channel with high priority, highlighted in red, persistently saved and not automatically deleted.
After sending the notification, the automation waits 10 hours. The value of the sensor is then sensor.roborock_s7_total_clean_area
into the variable input_number.last_empty_value
to save the new status for the next calculation. I assume that I have emptied the container within the 10 hours.
It runs in "single" mode, which means that it cannot be executed multiple times in parallel.
Helper sensor sensor.cleaning_since_last_emptying
Template:
{% set total = states('sensor.roborock_s7_total_clean_area') | float(0) %}
{% set last_empty = states('input_number.last_empty_value') | float(0) %}
{{ (total - last_empty) | round(1) }}
You can find out what you need, namely a few helpers, in the video below!
YouTube video implementation
Conclusion
With this automation you have a Fully automated reminder system for your robot hoover - without any additional hardware. The combination of device status, counter and targeted notifications ensures that your home stays clean and you will never again notice in the middle of mopping that the tank is empty or the cloth is unusable.
0 Comments