From e78659a6388bc3311267013fd3a24eb704cb4ee1 Mon Sep 17 00:00:00 2001 From: Hristo Date: Thu, 1 Feb 2024 20:11:58 +0200 Subject: [PATCH] update readme.md and change state class for uptime sonsor to total_increasing --- README.md | 1 + src/rpi-cpu2mqtt.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index a516bde..6896387 100644 --- a/README.md +++ b/README.md @@ -141,6 +141,7 @@ sys_clock_speed = True swap = True memory = True uptime = True +uptime_seconds = False wifi_signal = False wifi_signal_dbm = False rpi5_fan_speed = False diff --git a/src/rpi-cpu2mqtt.py b/src/rpi-cpu2mqtt.py index ff6f2d6..0e3f19d 100644 --- a/src/rpi-cpu2mqtt.py +++ b/src/rpi-cpu2mqtt.py @@ -272,7 +272,7 @@ def config_json(what_config): data["icon"] = "mdi:calendar" data["name"] = "Uptime" data["unit_of_measurement"] = "days" - data["state_class"] = "measurement" + data["state_class"] = "total_increasing" elif what_config == "uptime_seconds": data["icon"] = "mdi:timer-outline" data["name"] = "Uptime"