From b915db58d187fdecda587b41a3c23013fabbd1c6 Mon Sep 17 00:00:00 2001 From: Jason Rumney Date: Thu, 9 Jan 2025 00:46:29 +0900 Subject: [PATCH] config flow: Use helper to log json, clean up imports --- custom_components/tuya_local/cloud.py | 1 - custom_components/tuya_local/config_flow.py | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/custom_components/tuya_local/cloud.py b/custom_components/tuya_local/cloud.py index cbc342da23..64d00c59bf 100644 --- a/custom_components/tuya_local/cloud.py +++ b/custom_components/tuya_local/cloud.py @@ -1,4 +1,3 @@ -import json import logging from typing import Any diff --git a/custom_components/tuya_local/config_flow.py b/custom_components/tuya_local/config_flow.py index d2271ce4a1..4fbc27db32 100644 --- a/custom_components/tuya_local/config_flow.py +++ b/custom_components/tuya_local/config_flow.py @@ -414,7 +414,7 @@ async def async_step_select_type(self, user_input=None): 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)