Add icons to Teslemetry (#112546)

This commit is contained in:
Brett Adams 2024-03-13 06:06:09 +10:00 committed by GitHub
parent 78ea9bf681
commit 1dc3582778
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 71 additions and 50 deletions

View file

@ -128,7 +128,6 @@ VEHICLE_DESCRIPTIONS: tuple[TeslemetrySensorEntityDescription, ...] = (
),
TeslemetrySensorEntityDescription(
key="drive_state_shift_state",
icon="mdi:car-shift-pattern",
options=["p", "d", "r", "n"],
device_class=SensorDeviceClass.ENUM,
value_fn=lambda x: x.lower() if isinstance(x, str) else x,
@ -243,7 +242,6 @@ VEHICLE_DESCRIPTIONS: tuple[TeslemetrySensorEntityDescription, ...] = (
),
TeslemetrySensorEntityDescription(
key="drive_state_active_route_destination",
icon="mdi:map-marker",
entity_category=EntityCategory.DIAGNOSTIC,
),
)
@ -256,7 +254,6 @@ ENERGY_DESCRIPTIONS: tuple[SensorEntityDescription, ...] = (
suggested_unit_of_measurement=UnitOfPower.KILO_WATT,
suggested_display_precision=2,
device_class=SensorDeviceClass.POWER,
icon="mdi:solar-power",
),
SensorEntityDescription(
key="energy_left",
@ -266,7 +263,6 @@ ENERGY_DESCRIPTIONS: tuple[SensorEntityDescription, ...] = (
suggested_display_precision=2,
device_class=SensorDeviceClass.ENERGY_STORAGE,
entity_category=EntityCategory.DIAGNOSTIC,
icon="mdi:battery",
),
SensorEntityDescription(
key="total_pack_energy",
@ -276,7 +272,6 @@ ENERGY_DESCRIPTIONS: tuple[SensorEntityDescription, ...] = (
suggested_display_precision=2,
device_class=SensorDeviceClass.ENERGY_STORAGE,
entity_category=EntityCategory.DIAGNOSTIC,
icon="mdi:battery-high",
entity_registry_enabled_default=False,
),
SensorEntityDescription(
@ -293,7 +288,6 @@ ENERGY_DESCRIPTIONS: tuple[SensorEntityDescription, ...] = (
suggested_unit_of_measurement=UnitOfPower.KILO_WATT,
suggested_display_precision=2,
device_class=SensorDeviceClass.POWER,
icon="mdi:home-battery",
),
SensorEntityDescription(
key="load_power",
@ -302,7 +296,6 @@ ENERGY_DESCRIPTIONS: tuple[SensorEntityDescription, ...] = (
suggested_unit_of_measurement=UnitOfPower.KILO_WATT,
suggested_display_precision=2,
device_class=SensorDeviceClass.POWER,
icon="mdi:power-plug",
),
SensorEntityDescription(
key="grid_power",
@ -311,7 +304,6 @@ ENERGY_DESCRIPTIONS: tuple[SensorEntityDescription, ...] = (
suggested_unit_of_measurement=UnitOfPower.KILO_WATT,
suggested_display_precision=2,
device_class=SensorDeviceClass.POWER,
icon="mdi:transmission-tower",
),
SensorEntityDescription(
key="grid_services_power",
@ -320,7 +312,6 @@ ENERGY_DESCRIPTIONS: tuple[SensorEntityDescription, ...] = (
suggested_unit_of_measurement=UnitOfPower.KILO_WATT,
suggested_display_precision=2,
device_class=SensorDeviceClass.POWER,
icon="mdi:transmission-tower",
),
SensorEntityDescription(
key="generator_power",
@ -329,7 +320,6 @@ ENERGY_DESCRIPTIONS: tuple[SensorEntityDescription, ...] = (
suggested_unit_of_measurement=UnitOfPower.KILO_WATT,
suggested_display_precision=2,
device_class=SensorDeviceClass.POWER,
icon="mdi:generator-stationary",
entity_registry_enabled_default=False,
),
)
@ -339,13 +329,11 @@ WALL_CONNECTOR_DESCRIPTIONS: tuple[SensorEntityDescription, ...] = (
key="wall_connector_state",
entity_category=EntityCategory.DIAGNOSTIC,
entity_registry_enabled_default=False,
icon="mdi:ev-station",
),
SensorEntityDescription(
key="wall_connector_fault_state",
entity_category=EntityCategory.DIAGNOSTIC,
entity_registry_enabled_default=False,
icon="mdi:ev-station",
),
SensorEntityDescription(
key="wall_connector_power",
@ -354,11 +342,9 @@ WALL_CONNECTOR_DESCRIPTIONS: tuple[SensorEntityDescription, ...] = (
suggested_unit_of_measurement=UnitOfPower.KILO_WATT,
suggested_display_precision=2,
device_class=SensorDeviceClass.POWER,
icon="mdi:ev-station",
),
SensorEntityDescription(
key="vin",
icon="mdi:car-electric",
),
)