From 2b38df27668b721ca8d7ca5bb9bd7992f8f9fcfc Mon Sep 17 00:00:00 2001 From: Felipe Martins Diel <41558831+felipediel@users.noreply.github.com> Date: Tue, 19 May 2020 08:46:12 -0300 Subject: [PATCH] Allow underscores in broadlink hostnames (#35791) * Allow underscores in hostnames * Ignore case --- homeassistant/components/broadlink/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/homeassistant/components/broadlink/__init__.py b/homeassistant/components/broadlink/__init__.py index 040b22945fd..a729ac0ff4a 100644 --- a/homeassistant/components/broadlink/__init__.py +++ b/homeassistant/components/broadlink/__init__.py @@ -31,12 +31,12 @@ def data_packet(value): def hostname(value): """Validate a hostname.""" - host = str(value).lower() + host = str(value) if len(host) > 253: raise ValueError if host[-1] == ".": host = host[:-1] - allowed = re.compile(r"(?!-)[a-z\d-]{1,63}(?