Replace charging_time_remaining with charging_end_time in bmw_connected_drive (#60942)

Co-authored-by: rikroe <rikroe@users.noreply.github.com>
This commit is contained in:
rikroe 2021-12-22 12:52:01 +01:00 committed by GitHub
parent f40870b4d7
commit 986b60e527
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -19,7 +19,6 @@ from homeassistant.const import (
LENGTH_KILOMETERS, LENGTH_KILOMETERS,
LENGTH_MILES, LENGTH_MILES,
PERCENTAGE, PERCENTAGE,
TIME_HOURS,
VOLUME_GALLONS, VOLUME_GALLONS,
VOLUME_LITERS, VOLUME_LITERS,
) )
@ -49,11 +48,18 @@ class BMWSensorEntityDescription(SensorEntityDescription):
SENSOR_TYPES: dict[str, BMWSensorEntityDescription] = { SENSOR_TYPES: dict[str, BMWSensorEntityDescription] = {
# --- Generic --- # --- Generic ---
"charging_time_remaining": BMWSensorEntityDescription( "charging_start_time": BMWSensorEntityDescription(
key="charging_time_remaining", key="charging_start_time",
icon="mdi:update", device_class=SensorDeviceClass.TIMESTAMP,
unit_metric=TIME_HOURS, entity_registry_enabled_default=False,
unit_imperial=TIME_HOURS, ),
"charging_end_time": BMWSensorEntityDescription(
key="charging_end_time",
device_class=SensorDeviceClass.TIMESTAMP,
),
"charging_time_label": BMWSensorEntityDescription(
key="charging_time_label",
entity_registry_enabled_default=False,
), ),
"charging_status": BMWSensorEntityDescription( "charging_status": BMWSensorEntityDescription(
key="charging_status", key="charging_status",