From 16a593e2a013080f9612d7b1be0c3a815c0b5849 Mon Sep 17 00:00:00 2001 From: SchiZzA Date: Wed, 27 May 2026 21:50:14 +0200 Subject: [PATCH] fix DEV_DBG as constant not string literal --- custom_components/sws12500/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/custom_components/sws12500/__init__.py b/custom_components/sws12500/__init__.py index e04f9c6..8a8d64d 100644 --- a/custom_components/sws12500/__init__.py +++ b/custom_components/sws12500/__init__.py @@ -207,7 +207,7 @@ class WeatherDataUpdateCoordinator(DataUpdateCoordinator): if health: health.update_forwarding(self.windy, self.pocasi) - if (_ := checked(self.config.options.get(DEV_DBG), True)) is not None: + if checked_or(self.config.options.get(DEV_DBG), bool, False): _LOGGER.info("Dev log (ecowitt): %s", anonymize(data)) return aiohttp.web.Response(body="OK", status=200) @@ -404,7 +404,7 @@ class WeatherDataUpdateCoordinator(DataUpdateCoordinator): health.update_forwarding(self.windy, self.pocasi) # Optional dev logging (keep it lightweight to avoid log spam under high-frequency updates). - if self.config.options.get("dev_debug_checkbox"): + if checked_or(self.config.options.get(DEV_DBG), bool, False): _LOGGER.info("Dev log: %s", anonymize(data)) return aiohttp.web.Response(body="OK", status=200)