mirror of
https://github.com/home-assistant/core.git
synced 2026-03-02 15:52:29 +00:00
Co-authored-by: Claude <noreply@anthropic.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: Joostlek <joostlek@outlook.com>
48 lines
1.1 KiB
Python
48 lines
1.1 KiB
Python
"""The Tessie integration models."""
|
|
|
|
from __future__ import annotations
|
|
|
|
from dataclasses import dataclass
|
|
|
|
from tesla_fleet_api.tessie import EnergySite
|
|
|
|
from homeassistant.helpers.device_registry import DeviceInfo
|
|
|
|
from .coordinator import (
|
|
TessieBatteryHealthCoordinator,
|
|
TessieEnergyHistoryCoordinator,
|
|
TessieEnergySiteInfoCoordinator,
|
|
TessieEnergySiteLiveCoordinator,
|
|
TessieStateUpdateCoordinator,
|
|
)
|
|
|
|
|
|
@dataclass
|
|
class TessieData:
|
|
"""Data for the Tessie integration."""
|
|
|
|
vehicles: list[TessieVehicleData]
|
|
energysites: list[TessieEnergyData]
|
|
|
|
|
|
@dataclass
|
|
class TessieEnergyData:
|
|
"""Data for a Energy Site in the Tessie integration."""
|
|
|
|
api: EnergySite
|
|
live_coordinator: TessieEnergySiteLiveCoordinator | None
|
|
info_coordinator: TessieEnergySiteInfoCoordinator
|
|
history_coordinator: TessieEnergyHistoryCoordinator | None
|
|
id: int
|
|
device: DeviceInfo
|
|
|
|
|
|
@dataclass
|
|
class TessieVehicleData:
|
|
"""Data for a Tessie vehicle."""
|
|
|
|
data_coordinator: TessieStateUpdateCoordinator
|
|
battery_coordinator: TessieBatteryHealthCoordinator
|
|
device: DeviceInfo
|
|
vin: str
|