From e203aba6c171da9a34b137a2fa4487a2e214a7df Mon Sep 17 00:00:00 2001 From: Daniel Date: Wed, 30 Aug 2023 13:02:37 +0200 Subject: [PATCH] Revert runningstate --- custom_components/saj_esolar/sensor.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/custom_components/saj_esolar/sensor.py b/custom_components/saj_esolar/sensor.py index 97b4a95..db0ca7c 100644 --- a/custom_components/saj_esolar/sensor.py +++ b/custom_components/saj_esolar/sensor.py @@ -870,10 +870,8 @@ async def async_update(self): if energy['plantDetail']["runningState"] is not None: if int(energy['plantDetail']["runningState"]) is 0: self._state = "No" - elif int(energy['plantDetail']["runningState"]) is 1 - self._state = "Yes" else: - self._state = "Error" + self._state = "Yes" if self._type == 'todayElectricity': if 'todayElectricity' in energy['plantDetail']: if energy['plantDetail']["todayElectricity"] is not None: