Strip trailing spaces from HomeKit names (#131971)

This commit is contained in:
J. Nick Koston
2024-11-30 14:47:40 -06:00
committed by GitHub
parent bcdac7ed37
commit 2b907ee56e
3 changed files with 4 additions and 3 deletions

View File

@@ -267,6 +267,7 @@ def test_convert_to_float() -> None:
def test_cleanup_name_for_homekit() -> None:
"""Ensure name sanitize works as expected."""
assert cleanup_name_for_homekit("abc") == "abc"
assert cleanup_name_for_homekit("abc ") == "abc"
assert cleanup_name_for_homekit("a b c") == "a b c"
assert cleanup_name_for_homekit("ab_c") == "ab c"