Hello, I’ve been trying to figure out how to have my Roborock S7 automatically mop the floor once a month, preferably in the weekend. I’ve setup vacuuming when I’m not home which works perfectly, but can’t quite figure out mopping. I’m using the humbertogontijo/homeassistant-roborock integration.
This is pretty much what I want:
Trigger
When leaving home zone
Conditions
Has vacuumed today (have a toggle to check that)
Been a month since mopping (not sure how to do this)
It’s weekend
Action
Send notification if it should start mopping, if yes then: check/wait for vacuum 100% charged
Start mopping
This is what I have at the moment, haven’t setup the notification yet as I first wanted to figure out how to have the mopping happen once a month
Would also be nice that if I stay home one weekend it’ll ask me the next weekend until I say confirm, and then don’t ask for another month
alias: Vacuum mopping
description: ""
trigger:
- platform: zone
entity_id: person.me
zone: zone.home
event: leave
condition:
- condition: and
conditions:
- condition: state
entity_id: vacuum.roborock_s7_maxv
state: docked
- condition: time
weekday:
- sun
- sat
- fri
after: "12:00:00"
before: "20:00:00"
- condition: state
state: "on"
entity_id: input_boolean.cleaned
action:
- wait_for_trigger:
- platform: state
entity_id:
- vacuum.roborock_s7_maxv
attribute: battery
to: "100"
- service: vacuum.set_fan_speed
data:
fan_speed: "Off"
target:
entity_id: vacuum.roborock_s7_maxv
- service: roborock.vacuum_set_mop_mode
data:
mop_mode: deep_plus
target:
entity_id: vacuum.roborock_s7_maxv
- device_id: 904c041a0d81c06d6a7cdf1dab
domain: vacuum
entity_id: vacuum.roborock_s7_maxv
type: clean
mode: single
If the robot does not provide a sensor for last time mopping occured, that is the first thing you will need to provide, either through another input boolean or a template sensor. It would help if you could provide the entity information for the robot from the States tool in the Developer Tools menu.
Hmm, good points, there is no state for the last time it mopped, however I could perhaps somehow check the last time the mop_intensity changed. Or indeed use a boolean, although I’m not sure how to have it wait for a month to change the boolean, doubt that would be done with a timer?
That part can be handle a couple ways… but not with a timer. The most basic is as @Hellis81 mentioned, set the value of a datetime helper. That datetime helper then becomes the basis for a trigger and/or condition.