Reduce overhead to write HomeKit Controller state (#102365)
This commit is contained in:
parent
84d0907fc8
commit
3014a651c3
5 changed files with 33 additions and 30 deletions
|
@ -1,4 +1,5 @@
|
|||
"""Helper functions for the homekit_controller component."""
|
||||
from functools import lru_cache
|
||||
from typing import cast
|
||||
|
||||
from aiohomekit import Controller
|
||||
|
@ -11,6 +12,7 @@ from .const import CONTROLLER
|
|||
from .storage import async_get_entity_storage
|
||||
|
||||
|
||||
@lru_cache
|
||||
def folded_name(name: str) -> str:
|
||||
"""Return a name that is used for matching a similar string."""
|
||||
return name.casefold().replace(" ", "")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue