Closed iamkhris closed 4 years ago
Also curious about this. Had a look through and can't see how to change it.
You can alter the call to the darksky API to achieve this. Look for the following around about line199 in weather.py:
self.weather = forecast(config.DS_API_KEY,
config.LAT,
config.LON,
exclude='minutely')
This is the call and it can be adjusted as per the instructions here:
https://darksky.net/dev/docs I prefer the "uk2" style which uses celcius for temps and miles for wind speeds etc, so I altered the API call to be the following and it works fine:
self.weather = forecast(config.DS_API_KEY,
config.LAT,
config.LON,
exclude='minutely',
units='uk2')
Sorry I didn’t see this sooner. I’ll look at adding a confit flag for metric.
@genebean Thanks. Love the display! Got it on the wall at work.
I am working on this but still have some bits to figure out. Here is the status https://github.com/genebean/PiWeatherRock/compare/metric
The main thing I need to figure out is how I want to determine when to show mph
vs kph
and the like
If you all have any additional requests for making this work better when using something other than us
for units please let me know.
Any way to get this to display temperatures/values in metric?