Просмотр исходного кода

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

Jason Rumney 1 год назад
Родитель
Сommit
b915db58d1

+ 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)