From 6fe5582c6a4318a202d27919b4aa9e18e6b27528 Mon Sep 17 00:00:00 2001 From: Tim McCormick Date: Tue, 24 Sep 2019 02:45:14 +0100 Subject: [PATCH] Add unit to 'charging_level_hv' bwm_connected_drive sensor (#26861) * Update sensor.py Add unit to charging_level_hv, which allows correct graphing in UI * Update sensor.py Add space after # --- homeassistant/components/bmw_connected_drive/sensor.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/homeassistant/components/bmw_connected_drive/sensor.py b/homeassistant/components/bmw_connected_drive/sensor.py index 96d541b1955..28a4e853f2c 100644 --- a/homeassistant/components/bmw_connected_drive/sensor.py +++ b/homeassistant/components/bmw_connected_drive/sensor.py @@ -24,6 +24,8 @@ ATTR_TO_HA_METRIC = { "remaining_fuel": ["mdi:gas-station", VOLUME_LITERS], "charging_time_remaining": ["mdi:update", "h"], "charging_status": ["mdi:battery-charging", None], + # No icon as this is dealt with directly as a special case in icon() + "charging_level_hv": [None, "%"], } ATTR_TO_HA_IMPERIAL = { @@ -35,6 +37,8 @@ ATTR_TO_HA_IMPERIAL = { "remaining_fuel": ["mdi:gas-station", VOLUME_GALLONS], "charging_time_remaining": ["mdi:update", "h"], "charging_status": ["mdi:battery-charging", None], + # No icon as this is dealt with directly as a special case in icon() + "charging_level_hv": [None, "%"], }