From 72a2976c29784243142f31603018b1222050ae1c Mon Sep 17 00:00:00 2001 From: Karl Moos Date: Tue, 7 Nov 2023 20:06:51 -0600 Subject: [PATCH] Issue 14 (#29) * Add install.py * Fix formatting issues * Fix formatting issues * Fix formatting issues * Fix formatting issues * Fix formatting issues --- bin/user/ambientweatherapi.py | 2 +- install.py | 27 +++++++++++++++++++++++++++ 2 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 install.py diff --git a/bin/user/ambientweatherapi.py b/bin/user/ambientweatherapi.py index 96bdaf1..dd7df95 100644 --- a/bin/user/ambientweatherapi.py +++ b/bin/user/ambientweatherapi.py @@ -19,7 +19,7 @@ from os import path DRIVER_NAME = 'ambientweatherapi' -DRIVER_VERSION = '0.0.6' +DRIVER_VERSION = '0.0.8' def loader(config_dict, engine): diff --git a/install.py b/install.py new file mode 100644 index 0000000..f6c87c2 --- /dev/null +++ b/install.py @@ -0,0 +1,27 @@ +# Distributed under the terms of the GNU Public License (GPLv3) + +from weecfg.extension import ExtensionInstaller + + +def loader(): + return AmbientWeatherApiInstaller() + + +class AmbientWeatherApiInstaller(ExtensionInstaller): + def __init__(self): + super(AmbientWeatherApiInstaller, self).__init__( + version="0.0.8", + name='ambientweatherapi', + description='WeeWx AmbientWeather API Driver.', + author="Karl Moos", + restful_services='user.ambientweatherapi.AmbientWeatherAPI', + config={ + 'ambientweatherapi': { + 'driver': 'user.ambientweatherapi', + 'loop_interval': '120', + 'api_url': 'https://api.ambientweather.net/v1', + 'api_app_key': 'xxxxxx', + 'api_key': 'xxxxxx', + 'hardware': 'My Weather Station'}}, + files=[('bin/user', ['bin/user/ambientweatherapi.py'])] + )