From 4e9c50739212101f9ada2dd1d47b0dc614ec4338 Mon Sep 17 00:00:00 2001 From: veista Date: Wed, 23 Nov 2022 23:52:44 +0200 Subject: [PATCH] Added some logging --- custom_components/nilan/config_flow.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/custom_components/nilan/config_flow.py b/custom_components/nilan/config_flow.py index 8248952..03d5d7f 100644 --- a/custom_components/nilan/config_flow.py +++ b/custom_components/nilan/config_flow.py @@ -5,6 +5,7 @@ import voluptuous as vol +import logging from homeassistant import config_entries @@ -29,6 +30,8 @@ } ) +_LOGGER = logging.getLogger(__name__) + async def validate_device(address, port, unit_id) -> None: """validate device model""" @@ -49,6 +52,10 @@ async def validate_device(address, port, unit_id) -> None: signed=True, ) if not value_output in DEVICE_TYPES: + _LOGGER.debug( + "Device Type %s not found in supported devices list", + str(value_output), + ) raise ValueError("unsupported_device") client.close() return