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\-]")