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 <rikroe@users.noreply.github.com>
This commit is contained in:
rikroe 2022-08-19 08:36:46 +02:00 committed by GitHub
parent 72a4f8af3d
commit 4eb4146e29
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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",