From 096fd0229390a5698520b165ddea15662c20e7cc Mon Sep 17 00:00:00 2001 From: fstancu <73197731+fstancu@users.noreply.github.com> Date: Sun, 26 Apr 2026 17:04:47 +0300 Subject: [PATCH] Check for None instead of truthy value for light sensor Fix light sensor detection on models which return LigSen = 0. --- custom_components/gree/climate.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/custom_components/gree/climate.py b/custom_components/gree/climate.py index 539373e..fa0e397 100644 --- a/custom_components/gree/climate.py +++ b/custom_components/gree/climate.py @@ -511,7 +511,7 @@ async def SyncState(self, acOptions={}): except Exception: _LOGGER.debug("Could not determine whether device has a built-in light sensor. Retrying at next update()") else: - if light_sensor: + if light_sensor is not None: self._has_light_sensor = True self._acOptions.update({"LigSen": None}) self._optionsToFetch.append("LigSen")