mirror of
https://github.com/home-assistant/core.git
synced 2025-07-21 20:27:08 +00:00
zha: Strip whitespace from device names (#8306)
This commit is contained in:
parent
407a419c83
commit
5cba3085b4
@ -273,7 +273,7 @@ def _discover_endpoint_info(endpoint):
|
|||||||
for key, value in extra_info.items():
|
for key, value in extra_info.items():
|
||||||
if isinstance(value, bytes):
|
if isinstance(value, bytes):
|
||||||
try:
|
try:
|
||||||
extra_info[key] = value.decode('ascii')
|
extra_info[key] = value.decode('ascii').strip()
|
||||||
except UnicodeDecodeError:
|
except UnicodeDecodeError:
|
||||||
# Unsure what the best behaviour here is. Unset the key?
|
# Unsure what the best behaviour here is. Unset the key?
|
||||||
pass
|
pass
|
||||||
|
Loading…
x
Reference in New Issue
Block a user