* WIP * wip * Add energy classes * Add basis for Testing * Bump Library * fix case * bump library * bump library again * bump library for teslemetry * reorder * Fix super * Update strings.json * Tests * Small tweaks * Bump * Bump teslemetry * Remove version * Add WC states * Bump to match dev * Review feedback Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com> * Review feedback * Review feedback 1 * Review feedback 2 * TessieWallConnectorStates Enum * fixes * Fix translations and value * Update homeassistant/components/tessie/strings.json * Update homeassistant/components/tessie/strings.json --------- Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
43 lines
933 B
Python
43 lines
933 B
Python
"""The Tessie integration models."""
|
|
|
|
from __future__ import annotations
|
|
|
|
from dataclasses import dataclass
|
|
|
|
from tesla_fleet_api import EnergySpecific
|
|
|
|
from homeassistant.helpers.device_registry import DeviceInfo
|
|
|
|
from .coordinator import (
|
|
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: EnergySpecific
|
|
live_coordinator: TessieEnergySiteLiveCoordinator
|
|
info_coordinator: TessieEnergySiteInfoCoordinator
|
|
id: int
|
|
device: DeviceInfo
|
|
|
|
|
|
@dataclass
|
|
class TessieVehicleData:
|
|
"""Data for a Tessie vehicle."""
|
|
|
|
data_coordinator: TessieStateUpdateCoordinator
|
|
device: DeviceInfo
|
|
vin: str
|