Giter VIP home page Giter VIP logo

Comments (4)

Olen avatar Olen commented on August 20, 2024

This is the way it should work.
_0 should be the current (or next, upcoming) event. And when the event is over, event_1 should become event_0 etc. However, the switch might not happen at exactly the time the current/previous event is over. It depends on how often the ical-file is pulled and caching in various places etc.

from ical-sensor-homeassistant.

ThisBytes5 avatar ThisBytes5 commented on August 20, 2024

Issue is I'm not seeing it updated at all _0 is always the first event of the day, even at 4pm when I'm leaving work.

How often does the plugin request the ical from the server? Even if it only requested it once I would think it would still change through out the day.

from ical-sensor-homeassistant.

Olen avatar Olen commented on August 20, 2024

I think you are right. We don't check the start-time, only start-date when populating the sensors. So _0 is always the first event with an end-datetime after midnight today.
I'll see of we can fix this in a trivial way without breaking to many other things....

from ical-sensor-homeassistant.

Olen avatar Olen commented on August 20, 2024

I had a look at the code, and this is not very trivial to do....

I think it should be possible to replace this

event_list = self.ical_events.calendar

With a call to async_get_events with some reasonable "start" and "end" timestamps. But I have a fear that it will lead to race conditions where we might see more duplicate events or missing events in the different sensors.

And I don't have a proper development setup at the moment, as I don't have much time to do develoment for now.

from ical-sensor-homeassistant.

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.