mirror of
https://github.com/home-assistant/core.git
synced 2026-05-30 20:24:21 +01:00
d766aae436
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: frenck <195327+frenck@users.noreply.github.com>
45 lines
1.0 KiB
Python
45 lines
1.0 KiB
Python
"""The Tessie integration models."""
|
|
|
|
from dataclasses import dataclass
|
|
|
|
from tesla_fleet_api.tessie import EnergySite, Vehicle
|
|
|
|
from homeassistant.helpers.device_registry import DeviceInfo
|
|
|
|
from .coordinator import (
|
|
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."""
|
|
|
|
api: Vehicle
|
|
data_coordinator: TessieStateUpdateCoordinator
|
|
device: DeviceInfo
|
|
vin: str
|