Removed extended debugging info from sensors. Added descriptive method on route info.

ecowitt_support
SchiZzA 2026-03-01 17:32:36 +01:00
parent 01058a07b4
commit 7d1494f29b
No known key found for this signature in database
3 changed files with 8 additions and 26 deletions

View File

@ -78,7 +78,11 @@ class Routes:
"""
for route in self.routes.values():
if route.url_path == url_path:
_LOGGER.info("New coordinator to route: %s", route.url_path)
_LOGGER.info(
"New coordinator to route: (%s):%s",
route.route.method,
route.url_path,
)
route.enabled = True
route.handler = handler
else:
@ -102,7 +106,7 @@ class Routes:
self.routes[key] = RouteInfo(
url_path, route=route, handler=handler, enabled=enabled
)
_LOGGER.debug("Registered dispatcher for route %s", url_path)
_LOGGER.debug("Registered dispatcher for route (%s):%s", route.method, url_path)
def show_enabled(self) -> str:
"""Return a human-readable description of the currently enabled route."""

View File

@ -233,15 +233,6 @@ class WeatherSensor( # pyright: ignore[reportIncompatibleVariableOverride]
description = cast("WeatherSensorEntityDescription", self.entity_description)
if self._dev_log:
_LOGGER.debug(
"native_value start: key=%s, has_value_from_data_fn=%s, has_value_fn=%s, data_keys=%s",
key,
description.value_from_data_fn is not None,
description.value_fn is not None,
sorted(data),
)
if description.value_from_data_fn is not None:
try:
value = description.value_from_data_fn(data)
@ -250,12 +241,7 @@ class WeatherSensor( # pyright: ignore[reportIncompatibleVariableOverride]
"native_value compute failed via value_from_data_fn for key=%s", key
)
return None
if self._dev_log:
_LOGGER.debug(
"native_value computed via value_from_data_fn: key=%s -> %s",
key,
value,
)
return value
raw = data.get(key)
@ -277,14 +263,6 @@ class WeatherSensor( # pyright: ignore[reportIncompatibleVariableOverride]
)
return None
if self._dev_log:
_LOGGER.debug(
"native_value computed via value_fn: key=%s raw=%s -> %s",
key,
raw,
value,
)
return value
@property

View File

@ -20,9 +20,9 @@ from .const import (
CH2_BATTERY,
CH2_HUMIDITY,
CH2_TEMP,
CH3_BATTERY,
CH3_HUMIDITY,
CH3_TEMP,
CH3_BATTERY,
CH4_BATTERY,
CH4_HUMIDITY,
CH4_TEMP,