From 2d06d356f5d3e9a46ed903b177b9f2f845456cda Mon Sep 17 00:00:00 2001 From: Jean-Marc Collin Date: Mon, 15 Jul 2024 07:27:18 +0000 Subject: [PATCH] FIX set to zero sensor --- custom_components/solar_optimizer/sensor.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/custom_components/solar_optimizer/sensor.py b/custom_components/solar_optimizer/sensor.py index 5e3fc3d..e5c7d04 100644 --- a/custom_components/solar_optimizer/sensor.py +++ b/custom_components/solar_optimizer/sensor.py @@ -57,7 +57,7 @@ def _handle_coordinator_update(self) -> None: if ( not self.coordinator or not self.coordinator.data - or not (value := self.coordinator.data.get(self.idx)) + or (value := self.coordinator.data.get(self.idx)) == None ): _LOGGER.debug("No coordinator found or no data...") return