mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 11:17:21 +00:00
Cache formatting of mac addresses (#111140)
This commit is contained in:
parent
b740783f8d
commit
5bf8086a2b
@ -4,7 +4,7 @@ from __future__ import annotations
|
||||
from collections import UserDict
|
||||
from collections.abc import ValuesView
|
||||
from enum import StrEnum
|
||||
from functools import partial
|
||||
from functools import lru_cache, partial
|
||||
import logging
|
||||
import time
|
||||
from typing import TYPE_CHECKING, Any, Literal, TypedDict, TypeVar, cast
|
||||
@ -321,6 +321,7 @@ class DeletedDeviceEntry:
|
||||
)
|
||||
|
||||
|
||||
@lru_cache(maxsize=512)
|
||||
def format_mac(mac: str) -> str:
|
||||
"""Format the mac address string for entry into dev reg."""
|
||||
to_test = mac
|
||||
|
Loading…
x
Reference in New Issue
Block a user