mirror of
https://github.com/home-assistant/core.git
synced 2025-07-21 12:17:07 +00:00
Update models const in Teslemetry (#144175)
This commit is contained in:
parent
5a475ec7ea
commit
8046684179
@ -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,
|
||||
)
|
||||
|
||||
|
@ -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",
|
||||
|
Loading…
x
Reference in New Issue
Block a user