Add pressure and wind gust

This commit is contained in:
Scott Wallace 2021-07-01 15:16:57 +01:00
parent fb985c991f
commit 139997ae60
Signed by: scott
GPG key ID: AA742FDC5AFE2A72

16
main.py
View file

@ -86,6 +86,14 @@ def metrics():
'type': 'gauge', 'type': 'gauge',
'value': float(latest_data['wind_kph']), 'value': float(latest_data['wind_kph']),
}, },
{
'key': 'sensor_weather_outdoor_wind_gust',
'labels': {
'location': location,
},
'type': 'gauge',
'value': float(latest_data['gust_kph']),
},
{ {
'key': 'sensor_weather_outdoor_wind_direction', 'key': 'sensor_weather_outdoor_wind_direction',
'labels': { 'labels': {
@ -102,6 +110,14 @@ def metrics():
'type': 'gauge', 'type': 'gauge',
'value': float(latest_data['feelslike_c']), 'value': float(latest_data['feelslike_c']),
}, },
{
'key': 'sensor_weather_outdoor_pressure',
'labels': {
'location': location,
},
'type': 'gauge',
'value': float(latest_data['pressure_mb']),
},
] ]
ret_strs = list() ret_strs = list()