4
0
Эх сурвалжийг харах

Remove debug logging for values.

These are cluttering up the log, and there currently aren't any issues
in this function.
Jason Rumney 1 жил өмнө
parent
commit
52fbf095e6

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

@@ -503,11 +503,6 @@ class TuyaDpsConfig:
     def values(self, device):
     def values(self, device):
         """Return the possible values a dps can take."""
         """Return the possible values a dps can take."""
         if "mapping" not in self._config.keys():
         if "mapping" not in self._config.keys():
-            _LOGGER.debug(
-                "No mapping for dpid %s (%s), unable to determine valid values",
-                self.id,
-                self.name,
-            )
             return []
             return []
         val = []
         val = []
         for m in self._config["mapping"]:
         for m in self._config["mapping"]:
@@ -529,7 +524,6 @@ class TuyaDpsConfig:
 
 
             cond = self._active_condition(m, device)
             cond = self._active_condition(m, device)
             if cond and "mapping" in cond:
             if cond and "mapping" in cond:
-                _LOGGER.debug("Considering conditional mappings")
                 c_val = []
                 c_val = []
                 for m2 in cond["mapping"]:
                 for m2 in cond["mapping"]:
                     if self.should_show_mapping(m2, device):
                     if self.should_show_mapping(m2, device):
@@ -541,16 +535,8 @@ class TuyaDpsConfig:
                             c_val = c_val + r_dps.values(device)
                             c_val = c_val + r_dps.values(device)
                 # if given, the conditional mapping is an override
                 # if given, the conditional mapping is an override
                 if c_val:
                 if c_val:
-                    _LOGGER.debug(
-                        "Overriding %s values %s with %s",
-                        self.name,
-                        val,
-                        c_val,
-                    )
-
                     val = c_val
                     val = c_val
                     break
                     break
-        _LOGGER.debug("%s values: %s", self.name, val)
         return _remove_duplicates(val)
         return _remove_duplicates(val)
 
 
     @property
     @property