Code Monkey home page Code Monkey logo

Comments (7)

andyshilton avatar andyshilton commented on July 19, 2024 1

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')

from piweatherrock.

andyshilton avatar andyshilton commented on July 19, 2024 1

@genebean Thanks. Love the display! Got it on the wall at work.

from piweatherrock.

ssamjh avatar ssamjh commented on July 19, 2024

Also curious about this. Had a look through and can't see how to change it.

from piweatherrock.

genebean avatar genebean commented on July 19, 2024

Sorry I didn’t see this sooner. I’ll look at adding a confit flag for metric.

from piweatherrock.

genebean avatar genebean commented on July 19, 2024

I am working on this but still have some bits to figure out. Here is the status https://github.com/genebean/PiWeatherRock/compare/metric

from piweatherrock.

genebean avatar genebean commented on July 19, 2024

The main thing I need to figure out is how I want to determine when to show mph vs kph and the like

from piweatherrock.

genebean avatar genebean commented on July 19, 2024

If you all have any additional requests for making this work better when using something other than us for units please let me know.

from piweatherrock.

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.