Add entity translations to RDW (#96034)

This commit is contained in:
Joost Lekkerkerker 2023-07-07 14:40:22 +02:00 committed by GitHub
parent 7d97152593
commit d202b7c3c7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 22 additions and 4 deletions

View file

@ -41,13 +41,13 @@ class RDWBinarySensorEntityDescription(
BINARY_SENSORS: tuple[RDWBinarySensorEntityDescription, ...] = (
RDWBinarySensorEntityDescription(
key="liability_insured",
name="Liability insured",
translation_key="liability_insured",
icon="mdi:shield-car",
is_on_fn=lambda vehicle: vehicle.liability_insured,
),
RDWBinarySensorEntityDescription(
key="pending_recall",
name="Pending recall",
translation_key="pending_recall",
device_class=BinarySensorDeviceClass.PROBLEM,
is_on_fn=lambda vehicle: vehicle.pending_recall,
),