mirror of
https://github.com/home-assistant/core.git
synced 2025-08-03 20:55:10 +02:00
Cache formatting of mac addresses (#111140)
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user