kitchen: Round weather metrics

Home Assistant has started sending the full sensor values for weather
metrics to Prometheus, even though their precision is way beyond their
accuracy.  We don't need to see 4+ decimal points for these on the
Kitchen display, so let's round the values when we query.
This commit is contained in:
2025-07-21 14:40:35 -05:00
parent e51878fa92
commit 0822afe0b3

View File

@@ -73,13 +73,13 @@ spec:
weather: weather:
metrics: metrics:
temperature: >- temperature: >-
homeassistant_sensor_temperature_celsius{entity="sensor.outdoor_temperature"} round(homeassistant_sensor_temperature_celsius{entity="sensor.outdoor_temperature"}, 0.1)
humidity: >- humidity: >-
homeassistant_sensor_humidity_percent{entity="sensor.outdoor_humidity"} round(homeassistant_sensor_humidity_percent{entity="sensor.outdoor_humidity"}, 0.1)
wind_speed: >- wind_speed: >-
homeassistant_sensor_unit_m_per_s{entity="sensor.wind_speed"} round(homeassistant_sensor_unit_m_per_s{entity="sensor.wind_speed"}, 0.1)
pool: >- pool: >-
homeassistant_sensor_temperature_celsius{entity="sensor.pool_sensor_temperature"} round(homeassistant_sensor_temperature_celsius{entity="sensor.pool_sensor_temperature"}, 0.1)
homeassistant: homeassistant:
url: wss://homeassistant.pyrocufflink.blue/api/websocket url: wss://homeassistant.pyrocufflink.blue/api/websocket