Use enums in rdw (#62059)

This commit is contained in:
Robert Hillis 2021-12-16 09:10:54 -05:00 committed by GitHub
parent 079b7f217f
commit 5227019d3e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 5 deletions

View file

@ -7,7 +7,7 @@ from dataclasses import dataclass
from vehicle import Vehicle
from homeassistant.components.binary_sensor import (
DEVICE_CLASS_PROBLEM,
BinarySensorDeviceClass,
BinarySensorEntity,
BinarySensorEntityDescription,
)
@ -48,7 +48,7 @@ BINARY_SENSORS: tuple[RDWBinarySensorEntityDescription, ...] = (
RDWBinarySensorEntityDescription(
key="pending_recall",
name="Pending Recall",
device_class=DEVICE_CLASS_PROBLEM,
device_class=BinarySensorDeviceClass.PROBLEM,
is_on_fn=lambda vehicle: vehicle.pending_recall,
),
)