From 4eb4146e29f711aaf1bbde81c767d4e03ea01f93 Mon Sep 17 00:00:00 2001 From: rikroe <42204099+rikroe@users.noreply.github.com> Date: Fri, 19 Aug 2022 08:36:46 +0200 Subject: [PATCH] Remove unneeded charging_status attribute in bmw_connected_drive binary sensor (#74921) * Use `charging_status.value` in attribute for BMW binary sensor * Remove `charging_status` attribute Co-authored-by: rikroe --- homeassistant/components/bmw_connected_drive/binary_sensor.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/homeassistant/components/bmw_connected_drive/binary_sensor.py b/homeassistant/components/bmw_connected_drive/binary_sensor.py index d7e28eef41c..87506cc2230 100644 --- a/homeassistant/components/bmw_connected_drive/binary_sensor.py +++ b/homeassistant/components/bmw_connected_drive/binary_sensor.py @@ -180,9 +180,6 @@ SENSOR_TYPES: tuple[BMWBinarySensorEntityDescription, ...] = ( icon="mdi:ev-station", # device class power: On means power detected, Off means no power value_fn=lambda v: v.fuel_and_battery.charging_status == ChargingState.CHARGING, - attr_fn=lambda v, u: { - "charging_status": str(v.fuel_and_battery.charging_status), - }, ), BMWBinarySensorEntityDescription( key="connection_status",