From 986b60e527c02d42ce44f3bc9d98cb43b7e54dec Mon Sep 17 00:00:00 2001 From: rikroe <42204099+rikroe@users.noreply.github.com> Date: Wed, 22 Dec 2021 12:52:01 +0100 Subject: [PATCH] Replace charging_time_remaining with charging_end_time in bmw_connected_drive (#60942) Co-authored-by: rikroe --- .../components/bmw_connected_drive/sensor.py | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/homeassistant/components/bmw_connected_drive/sensor.py b/homeassistant/components/bmw_connected_drive/sensor.py index 1ef7e33497c..f21c1b851ca 100644 --- a/homeassistant/components/bmw_connected_drive/sensor.py +++ b/homeassistant/components/bmw_connected_drive/sensor.py @@ -19,7 +19,6 @@ from homeassistant.const import ( LENGTH_KILOMETERS, LENGTH_MILES, PERCENTAGE, - TIME_HOURS, VOLUME_GALLONS, VOLUME_LITERS, ) @@ -49,11 +48,18 @@ class BMWSensorEntityDescription(SensorEntityDescription): SENSOR_TYPES: dict[str, BMWSensorEntityDescription] = { # --- Generic --- - "charging_time_remaining": BMWSensorEntityDescription( - key="charging_time_remaining", - icon="mdi:update", - unit_metric=TIME_HOURS, - unit_imperial=TIME_HOURS, + "charging_start_time": BMWSensorEntityDescription( + key="charging_start_time", + device_class=SensorDeviceClass.TIMESTAMP, + entity_registry_enabled_default=False, + ), + "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( key="charging_status",