8000 GitHub - mawinkler/pyastroweatherio: Wrapper for the 7timer and met.no API designed to work with Home Assistant
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

mawinkler/pyastroweatherio

Repository files navigation

pyAstroWeatherIO

Wrapper for the MET Norway Weather and Open-Meteo RESTful APIs. Designed to work with Home Assistant and the custom AstroWeather integration.

In addition to the weather data, some calculations for the astronomical twilight and Moon setting, rising and phase are implemented. They indicate the darkness you can expect the upcoming night.

A new addition is an experimental mode that attempts to approximate the calculation of the lifted index, seeing atmospheric transparency, and ground fog density.

Functions

The module exposes the following function:

astroweather = AstroWeather(
    session,
    latitude,
    longitude,
    elevation,
    timezone_info,
    cloudcover_weight,
    cloudcover_high_weakening,
    cloudcover_medium_weakening,
    cloudcover_low_weakening,
    fog_weight,
    seeing_weight,
    transparency_weight,
    calm_weight,
    uptonight_path,
    experimental_features,
    forecast_model="icon_seamless",
)

astroweather.get_location_data

astroweather.get_hourly_forecast

This will return a handle to the AstroWeather class and open the connection.

Setup

pip3 install .

Build

python3 -m venv venv && source venv/bin/activate
pip install -r requirements.txt

python3 setup.py sdist
twine upload dist/*

Test

python -m unittest -v tests/client.py

About

Wrapper for the 7timer and met.no API designed to work with Home Assistant

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •  

Languages

0