2023-09-15 07:45:02,953 :: ERROR :: Unable to get temperature from openweathermap :
Traceback (most recent call last):
File "/usr/local/lib/python3.9/dist-packages/psa_car_controller/psacc/utils/utils.py", line 17, in get_temp
temp = weather_rep.json()["current"]["temp"]
KeyError: 'current'
Additional context
It seems like the API has changed, the temp now seems to be under the key "main" instead of "current":
HTTP/1.1 200 OK
Server: openresty
Date: Fri, 15 Sep 2023 15:27:10 GMT
Content-Type: application/json; charset=utf-8
Content-Length: 475
Connection: close
X-Cache-Key: /data/2.5/weather?exclude=minutely,hourly,daily,alerts&lat=xx&lon=yy&units=metric
Access-Control-Allow-Origin: *
Access-Control-Allow-Credentials: true
Access-Control-Allow-Methods: GET, POST
I'm also wondering why we don't get this data from the car, since the API seems to respond with the current temperature as measured by the car. Is that temperature inaccurate?
Describe the bug Open Weather not working with exception
To Reproduce Steps to reproduce the behavior:
Config file
Environment (please complete the following information):
Additional context It seems like the API has changed, the temp now seems to be under the key "main" instead of "current":
I'm also wondering why we don't get this data from the car, since the API seems to respond with the current temperature as measured by the car. Is that temperature inaccurate?