2021-05-22 08:14:59 +00:00
|
|
|
"""Constants for the Canary integration."""
|
|
|
|
from __future__ import annotations
|
|
|
|
|
|
|
|
from collections.abc import ValuesView
|
2022-01-11 20:23:26 +00:00
|
|
|
from typing import Optional, TypedDict
|
2021-05-22 08:14:59 +00:00
|
|
|
|
|
|
|
from canary.api import Location
|
|
|
|
|
|
|
|
|
|
|
|
class CanaryData(TypedDict):
|
|
|
|
"""TypedDict for Canary Coordinator Data."""
|
|
|
|
|
|
|
|
locations: dict[str, Location]
|
|
|
|
readings: dict[str, ValuesView]
|
|
|
|
|
|
|
|
|
2022-01-11 20:23:26 +00:00
|
|
|
SensorTypeItem = tuple[str, Optional[str], Optional[str], Optional[str], list[str]]
|