From d6bccabea6076485c6839f31d3e042726f8333cd Mon Sep 17 00:00:00 2001 From: "Joshua M. Boniface" Date: Wed, 2 Jul 2025 16:15:20 -0400 Subject: [PATCH] Convert Room Health Score to integer HASS 2025.7 has made it store (and display) a ridiculous number of decimals instead of just actually respecting accuracy_decimals. So, manually convert this to an integer since it has no need for decimals. --- supersensor.yaml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/supersensor.yaml b/supersensor.yaml index 7ade626..ba193eb 100644 --- a/supersensor.yaml +++ b/supersensor.yaml @@ -652,7 +652,6 @@ sensor: name: "Room Health Score" id: room_health_score unit_of_measurement: "%" - accuracy_decimals: 0 icon: mdi:home-heart lambda: |- float voc_index = id(sgp41_voc_index).state; @@ -679,7 +678,7 @@ sensor: // Weighted average float overall_score = (voc_score * 0.5 + temp_score * 0.25 + humidity_score * 0.25); - return round(overall_score); + return (int) round(overall_score); update_interval: 15s - platform: tsl2591