瀏覽代碼

config flow: Use helper to log json, clean up imports

Jason Rumney 1 年之前
父節點
當前提交
b915db58d1
共有 2 個文件被更改,包括 1 次插入2 次删除
  1. 0 1
      custom_components/tuya_local/cloud.py
  2. 1 1
      custom_components/tuya_local/config_flow.py

+ 0 - 1
custom_components/tuya_local/cloud.py

@@ -1,4 +1,3 @@
-import json
 import logging
 from typing import Any
 

+ 1 - 1
custom_components/tuya_local/config_flow.py

@@ -414,7 +414,7 @@ class ConfigFlowHandler(ConfigFlow, domain=DOMAIN):
                 if model:
                     _LOGGER.warning(
                         "Device specficication:\n%s",
-                        json.dumps(model, indent=4),
+                        log_json(model),
                     )
             except Exception as e:
                 _LOGGER.warning("Unable to fetch data model from cloud: %s", e)