Use HassKey for helpers (2) (#117013)

This commit is contained in:
Marc Mueller
2024-05-07 18:24:13 +02:00
committed by GitHub
parent c50a340cbc
commit 8f614fb06d
13 changed files with 69 additions and 39 deletions

View File

@ -10,12 +10,15 @@ from homeassistant.const import SUN_EVENT_SUNRISE, SUN_EVENT_SUNSET
from homeassistant.core import HomeAssistant, callback
from homeassistant.loader import bind_hass
from homeassistant.util import dt as dt_util
from homeassistant.util.hass_dict import HassKey
if TYPE_CHECKING:
import astral
import astral.location
DATA_LOCATION_CACHE = "astral_location_cache"
DATA_LOCATION_CACHE: HassKey[
dict[tuple[str, str, str, float, float], astral.location.Location]
] = HassKey("astral_location_cache")
ELEVATION_AGNOSTIC_EVENTS = ("noon", "midnight")