Coder Social home page Coder Social logo

calendartrigger's People

Contributors

philhzss avatar

Watchers

 avatar

calendartrigger's Issues

Make a "next event" check to report to API

Would be nice to able to see when the next event is. For now, we only find out there is an event when we test for it right now, so we would have to make a new function loop to check up to X hours into the future, then just update a variable containing the future event for the API

Add array to X amount of nextEvents to API?

Could be useful for other Home Assistant things I'm trying to do. If I can figure out the next next event, then I can figure out how many hours off I have between next two shifts. Perhaps just make an array that shows the next 5 events or something. Would be a mix of start and ends though.. unless I make the array just show starts, and only the "nextFutureEvent" can actually show starts and ends?

Running eventTimeCheck in initAll causes all actions to report as duplicates in triggerLoop

By running eventTimeCheck in initAll (ref e0d1733), yes we get the desired effect of no longer having an empty "future event" value between initAll & trigger loop, BUT, since it runs it, if there is an action (turn on light for example), when it actually runs it in the trigger loop, it will report duplicate, since it already reported lightOn in initAll... the action will never occur

We cannot run eventTimeCheck like that in initAll. Must add a flag to make sure it "doesn't count" for an action, or must somehow update future events without event time check

REST API will prevent light from turning off no matter what

Must be per person. Having a global "light should be on" and preventing light turn offs during that time will make it so that home assistant will never turn off the light if someone leaves during the regular light on period

API should report "light should be on" for each person and Home Assistant can shut down light only if that specific person has left home

API reports no people if called between cleanup & initAll

For a short moment (< 0.5s), between the cleanup from the last run and the init/reading of the settings file, the API does not know the people in the database so it just reports app settings. This is bad.

Maybe I could copy the last settings vector and overwrite it each run (updating it), instead of sending the one that gets wiped to the API?

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.