Hello,
can you help me for a moment. I want my “Xiaomi Vacuum” to vacuum once a day as soon as I leave the apartment.
I am currently stuck on the conditions of automation
Vacuum between 08:00 - 22:00 and only once a day.
The vacuum cleaner has the following attributes
Do not disturb on
Do not disturb start 22:00:00
Do not disturb end 08:00:00
Cleaning time 120
Cleaned area 31
Cleaning count 1071
Total cleaned area 22609
Total cleaning time 28579
Main brush left 250
Side brush left 180
Filter left 130
Sensor dirty left 10
Mop attached false
Clean start 2021-01-17T23:44:46
Clean stop 2021-01-17T23:44:48
Until now I have
condition: time
after:
- entity_id: vacuum.sandraxi
attribute: do_not_disturb_end #08:00
before:
- entity_id: vacuum.sandraxi
attribute: do_not_disturb_start #22:00
condition: not
conditions:
- condition: state
entity_id: vacuum.sandraxi
attribute: clean_start #2021-01-17T23:44:46
state: 'Actual date
Now the Home Assistant does not want to take over the times in condition time and I have not found anything how to convert the Clean_Start attribute to match it with the current date.
There’s a bunch of ways to do this I’d guess. If it were me, I’d create an input_boolean.vacuum_run_today. I’d then have two automations. One triggered at 00:00:01 that sets the input_boolean to FALSE. The other is triggered when you leave with a condition of input_boolean.vacuum_run_today = FALSE. The first ‘action’ of this automation would be to set this input_boolean to TRUE.
That was also my first thought but then I have the problem that Manuel started suction processes are not taken into account and in ‘clean_start’ stands yes the last suction process penetrate.
With ‘clean_start’ I must cut off actually only the first 10 characters and convert it then in Date, I find only not the functions around this to convert
Is it possible to use presence detection to fire your vacuum? I do that with mine, whether using the HA app on my phone or the other presence detection systems I have in place I can pretty reliably know when I’m gone.
With Zones and the HA app you can also know when you leave work or are at work to fire this off too.
I solved this similar to Markus99, having an input_boolean that is reset every night. However I set it with an automation that is triggered when the vacuum changes from cleaning to charging. This way manual triggers also are considered.
Additionally I used the presence of mine and my wifes smartphone at the fritzbox to control the start of the automatic cleanup.