From 515dbb2d46f1930aea29884a6999ba84605a0d02 Mon Sep 17 00:00:00 2001 From: Dolf Starreveld Date: Tue, 25 Jan 2022 15:51:28 -0800 Subject: [PATCH 1/2] Update const.py Changed PVS Error count from state class TOTAL_INCREASING to TOTAL, which is more appropriate as the count has been observed to go down at times and thus is not strictly increasing. --- custom_components/sunpower/const.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/custom_components/sunpower/const.py b/custom_components/sunpower/const.py index f4d4446..744ee6e 100644 --- a/custom_components/sunpower/const.py +++ b/custom_components/sunpower/const.py @@ -20,6 +20,7 @@ from homeassistant.components.sensor import ( STATE_CLASS_MEASUREMENT, + STATE_CLASS_TOTAL, STATE_CLASS_TOTAL_INCREASING ) @@ -132,7 +133,7 @@ "", "mdi:alert-circle", None, - STATE_CLASS_TOTAL_INCREASING + STATE_CLASS_TOTAL ], "PVS_COMMUNICATION_ERRORS": [ "dl_comm_err", From 0005ec993b65ec7e498a15d91cb8a053f8217022 Mon Sep 17 00:00:00 2001 From: Dolf Starreveld Date: Tue, 25 Jan 2022 16:27:15 -0800 Subject: [PATCH 2/2] Update const.py Needed to convert COMMUNICATION_ERRORS to class TOTAL as well. --- custom_components/sunpower/const.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/custom_components/sunpower/const.py b/custom_components/sunpower/const.py index 744ee6e..e6d6e68 100644 --- a/custom_components/sunpower/const.py +++ b/custom_components/sunpower/const.py @@ -141,7 +141,7 @@ "", "mdi:network-off", None, - STATE_CLASS_TOTAL_INCREASING + STATE_CLASS_TOTAL ], "PVS_SKIPPED_SCANS": [ "dl_skipped_scans",