From 98a4f9c49d029b037f27acfb0574ca9cc447da82 Mon Sep 17 00:00:00 2001 From: theneweinstein <34983911+theneweinstein@users.noreply.github.com> Date: Mon, 17 Jun 2024 14:52:30 +0200 Subject: [PATCH] Ignore IPv6 addresses --- custom_components/somneo/config_flow.py | 2 +- custom_components/somneo/manifest.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/custom_components/somneo/config_flow.py b/custom_components/somneo/config_flow.py index cd8875d..4d39695 100644 --- a/custom_components/somneo/config_flow.py +++ b/custom_components/somneo/config_flow.py @@ -24,7 +24,7 @@ def host_valid(host) -> bool: """Return True if hostname or IP address is valid.""" with suppress(ValueError): - if ipaddress.ip_address(host).version in [4, 6]: + if ipaddress.ip_address(host).version == 4: return True disallowed = re.compile(r"[^a-zA-Z\d\-]") return all(x and not disallowed.search(x) for x in host.split(".")) diff --git a/custom_components/somneo/manifest.json b/custom_components/somneo/manifest.json index a3007f1..f3a6a80 100644 --- a/custom_components/somneo/manifest.json +++ b/custom_components/somneo/manifest.json @@ -23,5 +23,5 @@ "modelName": "Wake-up Light" } ], - "version": "2024.4.0" + "version": "2024.6.0" }