Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Query History? #60

Open
ulek opened this issue May 12, 2023 · 2 comments
Open

Query History? #60

ulek opened this issue May 12, 2023 · 2 comments
Labels
enhancement New feature or request

Comments

@ulek
Copy link

ulek commented May 12, 2023

Is there any way to query the run history of the vacuum?
I would like to set up an automation that would vacuum my at least every three days.
If the cleaning gets triggered within the HA but at I don't see a way to account for manually triggered cleanings through an app or otherwise.

@Mr-HaleYa
Copy link

@ulek
you could keep track of cleaning like this

Create a counter helper named daysWithoutCleaning.

create an automation that fires when the vacuum state changes to cleaning and have that reset the daysWithoutCleaning to 0. This will fire when the vacuum is told to clean by the mobile app or home assistant

create an automation that runs every day at the time you want to clean ie. 3pm and set it up following this logic

if daysWithoutCleaning is >= 3
  start cleaning
else
  add increment daysWithoutCleaning

when 3pm comes around every day it will check if it has cleaned in the last 3 days, if it has it will skip, and if it hasn't it will clean and the other automation will run to reset the counter


if you want you could easily merge the two automation by setting triggered by IDs and choice conditions

@ulek
Copy link
Author

ulek commented May 28, 2023

@Mr-HaleYa

I think that doesn't really do what I want. I forgot to finish my thought in the first post

At the moment I pretty much do what you said by doing the following.
I have a automation (call it A) that fires off the vacuum when no one is home for an hour.
Another automation (call it B) checks at certain time when that automation A was triggered and if it is more than specified time (in my case 3 days) it triggers the automation A.

But sometimes the vacuum is manually triggered, i.e. made a bigger mess or before mopping the floor, so it would be nice if I could inhibit automation B (maybe even A) by polling the history.

Otherwise I think that I would have to set up services and automations that would poll vacuums quite often and then go from them to create and reset timers and or variables

@romedtino romedtino added the enhancement New feature or request label May 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants