Add more data gathering

This commit is contained in:
Scott Wallace 2021-06-28 10:00:13 +01:00
parent 88b6fd2436
commit fb985c991f
Signed by: scott
GPG key ID: AA742FDC5AFE2A72

48
main.py
View file

@ -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()