home-assistant / home-assistant.io

:blue_book: Home Assistant User documentation
https://www.home-assistant.io
Other
4.99k stars 7.29k forks source link

API Key Approved but Response is Bad Request #34127

Closed AlexDTeichroeb closed 3 months ago

AlexDTeichroeb commented 3 months ago

Feedback

Sorry if this isn't very technical as I don't have a lot of knowledge when it comes to Home Assistant. I created an API key for AccuWeather and it was approved. When using the API key in Home Assistant the integration recognizes it as valid, but when I attempted to use any data all I got back was "NaN" and "Unavailable". I have gone to https://developer.accuweather.com/accuweather-current-conditions-api/apis/get/currentconditions/v1/%7BlocationKey%7D to test my key and I found there was a bad request as follows:

HTTP/1.1 400 Bad Request Access-Control-Allow-Credentials: true Access-Control-Allow-Headers: DNT Access-Control-Allow-Methods: GET Access-Control-Allow-Origin: * Access-Control-Max-Age: 1728000 Akamai-GRN: 0.1f0cde17.1722839139.4cee0c8f Cache-Control: max-age=0 Connection: keep-alive Content-Encoding: gzip Content-Type: application/json Date: Mon, 05 Aug 2024 06:25:39 GMT Expires: Mon, 05 Aug 2024 06:25:39 GMT Pragma: no-cache RateLimit-Limit: 1 RateLimit-Remaining: 248 Request-Context: appId=cid-v1:0158d69b-75d9-4a19-9e5f-a14693f847e4 Transfer-Encoding: chunked Vary: Accept-Encoding { "Code": "400", "Message": "Invalid location key: locationKey", "Reference": "/currentconditions/v1/locationKey" }

When the page reloads there's also a red error banner stating "Missing value for template parameter(s): locationKey".

Just looking for some help with resolving this issue.

URL

https://www.home-assistant.io/integrations/accuweather/

Version

2024.7.4

Additional information

No response

home-assistant[bot] commented 3 months ago

Hey there @bieniu, mind taking a look at this feedback as it has been labeled with an integration (accuweather) you are listed as a code owner for? Thanks!

Code owner commands Code owners of `accuweather` can trigger bot actions by commenting: - `@home-assistant close` Closes the feedback. - `@home-assistant rename Awesome new title` Renames the feedback. - `@home-assistant reopen` Reopen the feedback. - `@home-assistant unassign accuweather` Removes the current integration label and assignees on the feedback, add the integration domain after the command. - `@home-assistant add-label needs-more-information` Add a label (needs-more-information) to the feedback. - `@home-assistant remove-label needs-more-information` Remove a label (needs-more-information) on the feedback.
bieniu commented 3 months ago

You have opened an issue in the documentation repository. This is not the right place to ask for support. You should open a thread in the community https://community.home-assistant.io/ Make sure you have generated a valid API key, as stated in the documentation https://www.home-assistant.io/integrations/accuweather/#setup