Code Monkey home page Code Monkey logo

Comments (5)

Agent6-6-6 avatar Agent6-6-6 commented on September 27, 2024 1

@Perchycs i just set the changeover time to 23:59, so it just picks up the rollover the next day.

from hacs_waste_collection_schedule.

5ila5 avatar 5ila5 commented on September 27, 2024

This kinda is intended behavior as the new implementation parses the website which only offers dates for the next collection. We could parse the information below the table saying how often a waste type is collected, but this adds a potential breaking point

for the detailed update PR see #1968

from hacs_waste_collection_schedule.

PHamiltonNZ avatar PHamiltonNZ commented on September 27, 2024

Ah I see, that's great. Thanks for letting me know

from hacs_waste_collection_schedule.

Agent6-6-6 avatar Agent6-6-6 commented on September 27, 2024

@5ila5, @PHamiltonNZ - There is a slight issue I am seeing with how it works currently by default.

Given only one date is given on the Auckland council website, it cannot obviously parse the next date. So if you accept the default day_switch_time of 10am, it shows up as unknown until the website updates as the next date isn't available to display.

Example of the behaviour I'm seeing and my configuration:-
Screenshot 2024-05-09 105126
Screenshot 2024-05-09 105145

  sources:
    - name: aucklandcouncil_govt_nz
      args:
        area_number: 12342484543
      customize:
        - type: rubbish
          alias: Rubbish
          icon: mdi:trash-can
        - type: recycle
          alias: Recycling
          icon: mdi:recycle
        - type: food-waste
          alias: Food Scraps
          icon: mdi:food-apple
      calendar_title: Auckland Council Rubbish & Recycling Collections

sensor:
  - platform: waste_collection_schedule
    name: Rubbish Collection Date
    types:
      - Rubbish

  - platform: waste_collection_schedule
    name: Recycling Collection Date
    types:
      - Recycling

  - platform: waste_collection_schedule
    name: Food Scraps Collection Date
    types:
      - Food Scraps

The only obvious way I can think of to deal with it is to set the day_switch_time variable to say 11:59PM or somehow pickup the unknown result and display something else. Have not waited a week to see if that works though.

Wondering how how are others dealing with this?

Not sure if this can be dealt with in a more gracious way by the addon itself, even if there is a reluctance to parse further information on the website as noted above.

from hacs_waste_collection_schedule.

Perchycs avatar Perchycs commented on September 27, 2024

@Agent6-6-6 what did you end up doing for this issue? I am thinking of templating the 'unknown' result as next week, but curious if anyone has thought of a better way.

from hacs_waste_collection_schedule.

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.