Code Monkey home page Code Monkey logo

Comments (6)

mampfes avatar mampfes commented on June 7, 2024 1

fixed in #51

from hacs_waste_collection_schedule.

millercentral avatar millercentral commented on June 7, 2024 1

I did and it works great, thanks so much @gabsom! So convenient having thiis as part of HA, thank you!

from hacs_waste_collection_schedule.

gabosom avatar gabosom commented on June 7, 2024

+1, @sguermond , we'll need your help :) I did the digging but I'm not proficient with python (or Home Assistant development) so I won't be of much help coding here, but I figured out the issue.

looking at the code, you're using API calls from https://www.seattle.gov/UTIL/WARP/CollectionCalendar, however they are actually not returning the right information. for example, I used the Carmona Court street address from your test case (1127 17TH AVE E) and the WARP API returns different info than looking at it in the collection calendar.

This is WARP:
image

This is the collection calendar:
image

I took a look at the API calls made by the collection calendar that would yield the right result and packed the fiddler file here. Essentially what happens is:

  • find account ID for a given address
  • get token (uses basic auth and the customerID = guest
    -- subsequent requests include this bearer token in the headrs
  • get account summary
  • get calendar

I wish I could help, but I think you have everything you need here.

from hacs_waste_collection_schedule.

gabosom avatar gabosom commented on June 7, 2024

I got the code working that pulls the right schedule - will try to clone repro and send a PR in a couple of dyas

from hacs_waste_collection_schedule.

gabosom avatar gabosom commented on June 7, 2024

@millercentral - did you update to the latest version? it's working great for me now, curious if it is for you as well.

from hacs_waste_collection_schedule.

sguermond avatar sguermond commented on June 7, 2024

@millercentral & @gabosom Thanks for catching that and fixing it so quickly! I found the API in another repo (https://github.com/mannkind/seattlewaste2mqtt) and did notice that it wasn't always returning correctly, but I was pretty stumped as to why.

I'll send in a request to the city to see what's up with the WARP API.

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.