mirror of
https://github.com/home-assistant/core.git
synced 2025-07-22 20:57:21 +00:00
Fix Charge Cable binary sensor in Teslemetry (#148675)
This commit is contained in:
parent
c802430066
commit
c4ddcd64c8
@ -125,8 +125,8 @@ VEHICLE_DESCRIPTIONS: tuple[TeslemetryBinarySensorEntityDescription, ...] = (
|
|||||||
key="charge_state_conn_charge_cable",
|
key="charge_state_conn_charge_cable",
|
||||||
polling=True,
|
polling=True,
|
||||||
polling_value_fn=lambda x: x != "<invalid>",
|
polling_value_fn=lambda x: x != "<invalid>",
|
||||||
streaming_listener=lambda vehicle, callback: vehicle.listen_ChargingCableType(
|
streaming_listener=lambda vehicle, callback: vehicle.listen_DetailedChargeState(
|
||||||
lambda value: callback(value is not None and value != "Unknown")
|
lambda value: callback(None if value is None else value != "Disconnected")
|
||||||
),
|
),
|
||||||
entity_category=EntityCategory.DIAGNOSTIC,
|
entity_category=EntityCategory.DIAGNOSTIC,
|
||||||
device_class=BinarySensorDeviceClass.CONNECTIVITY,
|
device_class=BinarySensorDeviceClass.CONNECTIVITY,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user