diff --git a/custom_components/uptime_kuma/utils.py b/custom_components/uptime_kuma/utils.py index a12243f..24fa8f4 100644 --- a/custom_components/uptime_kuma/utils.py +++ b/custom_components/uptime_kuma/utils.py @@ -14,4 +14,4 @@ def format_entity_name(string: str) -> str: def sensor_name_from_url(url: str) -> str: parsed_url = urlparse(url) clean_url = parsed_url.netloc.replace(":"+str(parsed_url.port), "") - return clean_url.replace(".", "_") \ No newline at end of file + return re.sub(r"\W+", "_", clean_url) \ No newline at end of file