1
0
mirror of https://github.com/home-assistant/core.git synced 2025-12-24 21:06:19 +00:00

Deprecate deprecated unit of measurement constants (#106455)

This commit is contained in:
Robert Resch
2023-12-27 09:04:25 +01:00
committed by GitHub
parent f92e732f27
commit fbcb31b103
9 changed files with 479 additions and 143 deletions

View File

@@ -67,10 +67,10 @@ from .const import (
EVENT_SERVICE_REGISTERED,
EVENT_SERVICE_REMOVED,
EVENT_STATE_CHANGED,
LENGTH_METERS,
MATCH_ALL,
MAX_LENGTH_EVENT_EVENT_TYPE,
MAX_LENGTH_STATE_STATE,
UnitOfLength,
__version__,
)
from .exceptions import (
@@ -2275,7 +2275,8 @@ class Config:
Async friendly.
"""
return self.units.length(
location.distance(self.latitude, self.longitude, lat, lon), LENGTH_METERS
location.distance(self.latitude, self.longitude, lat, lon),
UnitOfLength.METERS,
)
def path(self, *path: str) -> str: