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 Paulus Schoutsen
parent 0d155c416a
commit e8ef990e72
3 changed files with 4 additions and 3 deletions

View File

@ -255,6 +255,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"