Use device class ENUM for Tractive tracker state sensor (#97191)

pull/97951/head
Maciej Bieniek 2023-07-25 09:13:52 +00:00 committed by GitHub
parent 74deb8b011
commit fc41f3d25b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 9 additions and 2 deletions

View File

@ -172,11 +172,18 @@ SENSOR_TYPES: tuple[TractiveSensorEntityDescription, ...] = (
entity_category=EntityCategory.DIAGNOSTIC,
),
TractiveSensorEntityDescription(
# Currently, only state operational and not_reporting are used
# More states are available by polling the data
key=ATTR_TRACKER_STATE,
translation_key="tracker_state",
entity_class=TractiveHardwareSensor,
icon="mdi:radar",
entity_category=EntityCategory.DIAGNOSTIC,
device_class=SensorDeviceClass.ENUM,
options=[
"not_reporting",
"operational",
"system_shutdown_user",
"system_startup",
],
),
TractiveSensorEntityDescription(
key=ATTR_MINUTES_ACTIVE,