Update models const in Teslemetry (#144175)

This commit is contained in:
Brett Adams 2025-05-04 21:44:56 +10:00 committed by GitHub
parent 5a475ec7ea
commit 8046684179
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 9 deletions

View File

@ -23,7 +23,7 @@ from homeassistant.helpers.aiohttp_client import async_get_clientsession
from homeassistant.helpers.device_registry import DeviceInfo
from homeassistant.helpers.typing import ConfigType
from .const import DOMAIN, LOGGER, MODELS
from .const import DOMAIN, LOGGER
from .coordinator import (
TeslemetryEnergyHistoryCoordinator,
TeslemetryEnergySiteInfoCoordinator,
@ -119,7 +119,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: TeslemetryConfigEntry) -
manufacturer="Tesla",
configuration_url="https://teslemetry.com/console",
name=product["display_name"],
model=MODELS.get(vin[3]),
model=api.model,
serial_number=vin,
)

View File

@ -9,13 +9,6 @@ DOMAIN = "teslemetry"
LOGGER = logging.getLogger(__package__)
MODELS = {
"S": "Model S",
"3": "Model 3",
"X": "Model X",
"Y": "Model Y",
}
ENERGY_HISTORY_FIELDS = [
"solar_energy_exported",
"generator_energy_exported",