From 0822afe0b3cf567718cd20e4e55c54ad66ba3cd8 Mon Sep 17 00:00:00 2001 From: "Dustin C. Hatch" Date: Mon, 21 Jul 2025 14:40:35 -0500 Subject: [PATCH] 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. --- kitchen/secrets.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/kitchen/secrets.yaml b/kitchen/secrets.yaml index 207c10c..f106927 100644 --- a/kitchen/secrets.yaml +++ b/kitchen/secrets.yaml @@ -73,13 +73,13 @@ spec: weather: metrics: temperature: >- - homeassistant_sensor_temperature_celsius{entity="sensor.outdoor_temperature"} + round(homeassistant_sensor_temperature_celsius{entity="sensor.outdoor_temperature"}, 0.1) humidity: >- - homeassistant_sensor_humidity_percent{entity="sensor.outdoor_humidity"} + round(homeassistant_sensor_humidity_percent{entity="sensor.outdoor_humidity"}, 0.1) 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: >- - homeassistant_sensor_temperature_celsius{entity="sensor.pool_sensor_temperature"} + round(homeassistant_sensor_temperature_celsius{entity="sensor.pool_sensor_temperature"}, 0.1) homeassistant: url: wss://homeassistant.pyrocufflink.blue/api/websocket