Răsfoiți Sursa

config_flow: always round match quality and get dps for logging.

Issue #1667
Jason Rumney 2 ani în urmă
părinte
comite
d2415bb2b7
1 a modificat fișierele cu 2 adăugiri și 3 ștergeri
  1. 2 3
      custom_components/tuya_local/config_flow.py

+ 2 - 3
custom_components/tuya_local/config_flow.py

@@ -91,9 +91,8 @@ class ConfigFlowHandler(config_entries.ConfigFlow, domain=DOMAIN):
                 best_match = q
                 best_matching_type = type.config_type
 
-        if best_match < 100:
-            best_match = int(best_match)
-            dps = self.device._get_cached_state()
+        best_match = int(best_match)
+        dps = self.device._get_cached_state()
         _LOGGER.warning(
             "Device matches %s with quality of %d%%. DPS: %s",
             best_matching_type,