Skip to content

Commit

Permalink
Added some logging
Browse files Browse the repository at this point in the history
  • Loading branch information
veista committed Nov 23, 2022
1 parent 0edbc29 commit 4e9c507
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions custom_components/nilan/config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

import voluptuous as vol

import logging

from homeassistant import config_entries

Expand All @@ -29,6 +30,8 @@
}
)

_LOGGER = logging.getLogger(__name__)


async def validate_device(address, port, unit_id) -> None:
"""validate device model"""
Expand All @@ -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
Expand Down

0 comments on commit 4e9c507

Please sign in to comment.