From c1f6ddb991c73bc3230f83c1fe97941cc93a8b6a Mon Sep 17 00:00:00 2001 From: Paul Frank Date: Fri, 21 Jun 2024 18:52:52 +0000 Subject: [PATCH] fix --- custom_components/stiebel_eltron_isg/config_flow.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/custom_components/stiebel_eltron_isg/config_flow.py b/custom_components/stiebel_eltron_isg/config_flow.py index c1de1e2..d38dc0b 100644 --- a/custom_components/stiebel_eltron_isg/config_flow.py +++ b/custom_components/stiebel_eltron_isg/config_flow.py @@ -29,7 +29,7 @@ def host_valid(host): """Return True if hostname or IP address is valid.""" try: - if ipaddress.ip_address(host) in (4, 6): + if ipaddress.ip_address(host).version in (4, 6): return True except ValueError: disallowed = re.compile(r"[^a-zA-Z\d\-]")