فهرست منبع

Device config: reduce log verbosity

Even in debug logs we do not need to know that mappings are being "considered",
only what the final result of the mapping is.

Maybe in the early days this was relevant, to debug the mapping logic,
but now it is just noise in the debug log that hides real information.

Inspired by issue #2722
Jason Rumney 1 سال پیش
والد
کامیت
4ea3d30713
1فایلهای تغییر یافته به همراه0 افزوده شده و 3 حذف شده
  1. 0 3
      custom_components/tuya_local/helpers/device_config.py

+ 0 - 3
custom_components/tuya_local/helpers/device_config.py

@@ -590,7 +590,6 @@ class TuyaDpsConfig:
         mapping = self._find_map_for_dps(device.get_property(self.id), device)
         r = self._config.get("range")
         if mapping:
-            _LOGGER.debug("Considering mapping for range of %s", self.name)
             cond = self._active_condition(mapping, device)
             if cond:
                 r = cond.get("range", r)
@@ -628,13 +627,11 @@ class TuyaDpsConfig:
         scale = self.scale(device) if scaled else 1
         mapping = self._find_map_for_dps(device.get_property(self.id), device)
         if mapping:
-            _LOGGER.debug("Considering mapping for step of %s", self.name)
             step = mapping.get("step", 1)
 
             cond = self._active_condition(mapping, device)
             if cond:
                 constraint = mapping.get("constraint", self.name)
-                _LOGGER.debug("Considering condition on %s", constraint)
                 step = cond.get("step", step)
         if step != 1 or scale != 1:
             _LOGGER.debug(