From fb985c991f35db4f754b91c4a76700b853311d85 Mon Sep 17 00:00:00 2001 From: Scott Wallace Date: Mon, 28 Jun 2021 10:00:13 +0100 Subject: [PATCH] Add more data gathering --- main.py | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) diff --git a/main.py b/main.py index 01eb85a..e83059e 100644 --- a/main.py +++ b/main.py @@ -54,6 +54,54 @@ def metrics(): 'type': 'gauge', 'value': float(latest_data['humidity']), }, + { + 'key': 'sensor_weather_outdoor_uv', + 'labels': { + 'location': location, + }, + 'type': 'gauge', + 'value': float(latest_data['uv']), + }, + { + 'key': 'sensor_weather_outdoor_cloud_percent', + 'labels': { + 'location': location, + }, + 'type': 'gauge', + 'value': float(latest_data['cloud']), + }, + { + 'key': 'sensor_weather_outdoor_precip', + 'labels': { + 'location': location, + }, + 'type': 'gauge', + 'value': float(latest_data['precip_mm']), + }, + { + 'key': 'sensor_weather_outdoor_wind_speed', + 'labels': { + 'location': location, + }, + 'type': 'gauge', + 'value': float(latest_data['wind_kph']), + }, + { + 'key': 'sensor_weather_outdoor_wind_direction', + 'labels': { + 'location': location, + }, + 'type': 'gauge', + 'value': float(latest_data['wind_degree']), + }, + { + 'key': 'sensor_weather_outdoor_temp_feel_c', + 'labels': { + 'location': location, + }, + 'type': 'gauge', + 'value': float(latest_data['feelslike_c']), + }, ] ret_strs = list()