2023-12-25 12:01:13 +00:00
|
|
|
"""The Tessie integration models."""
|
2024-03-08 15:35:23 +00:00
|
|
|
|
2023-12-25 12:01:13 +00:00
|
|
|
from __future__ import annotations
|
|
|
|
|
|
|
|
from dataclasses import dataclass
|
|
|
|
|
2024-06-26 12:23:06 +00:00
|
|
|
from tesla_fleet_api import EnergySpecific
|
|
|
|
|
2024-06-26 09:46:30 +00:00
|
|
|
from homeassistant.helpers.device_registry import DeviceInfo
|
|
|
|
|
2024-06-26 12:23:06 +00:00
|
|
|
from .coordinator import (
|
|
|
|
TessieEnergySiteInfoCoordinator,
|
|
|
|
TessieEnergySiteLiveCoordinator,
|
|
|
|
TessieStateUpdateCoordinator,
|
|
|
|
)
|
2023-12-25 12:01:13 +00:00
|
|
|
|
|
|
|
|
|
|
|
@dataclass
|
2024-05-28 07:05:24 +00:00
|
|
|
class TessieData:
|
2023-12-25 12:01:13 +00:00
|
|
|
"""Data for the Tessie integration."""
|
|
|
|
|
2024-06-26 09:46:30 +00:00
|
|
|
vehicles: list[TessieVehicleData]
|
2024-06-26 12:23:06 +00:00
|
|
|
energysites: list[TessieEnergyData]
|
|
|
|
|
|
|
|
|
|
|
|
@dataclass
|
|
|
|
class TessieEnergyData:
|
|
|
|
"""Data for a Energy Site in the Tessie integration."""
|
|
|
|
|
|
|
|
api: EnergySpecific
|
|
|
|
live_coordinator: TessieEnergySiteLiveCoordinator
|
|
|
|
info_coordinator: TessieEnergySiteInfoCoordinator
|
|
|
|
id: int
|
|
|
|
device: DeviceInfo
|
2024-06-26 09:46:30 +00:00
|
|
|
|
|
|
|
|
|
|
|
@dataclass
|
|
|
|
class TessieVehicleData:
|
|
|
|
"""Data for a Tessie vehicle."""
|
|
|
|
|
|
|
|
data_coordinator: TessieStateUpdateCoordinator
|
|
|
|
device: DeviceInfo
|
|
|
|
vin: str
|