Giter Site home page Giter Site logo

Query History? about simple-wyze-vac HOT 2 OPEN

romedtino avatar romedtino commented on May 27, 2024
Query History?

from simple-wyze-vac.

Comments (2)

Mr-HaleYa avatar Mr-HaleYa commented on May 27, 2024

@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

from simple-wyze-vac.

ulek avatar ulek commented on May 27, 2024

@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

from simple-wyze-vac.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.