From 5cba3085b4ad48c391b208fc5c70312907df3cc6 Mon Sep 17 00:00:00 2001 From: Russell Cloran Date: Sun, 2 Jul 2017 23:31:16 -0700 Subject: [PATCH] zha: Strip whitespace from device names (#8306) --- homeassistant/components/zha/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/homeassistant/components/zha/__init__.py b/homeassistant/components/zha/__init__.py index 8c84fe166f0..183ced37825 100644 --- a/homeassistant/components/zha/__init__.py +++ b/homeassistant/components/zha/__init__.py @@ -273,7 +273,7 @@ def _discover_endpoint_info(endpoint): for key, value in extra_info.items(): if isinstance(value, bytes): try: - extra_info[key] = value.decode('ascii') + extra_info[key] = value.decode('ascii').strip() except UnicodeDecodeError: # Unsure what the best behaviour here is. Unset the key? pass