From fc41f3d25be967f60fa16b0df4e19714976e70ad Mon Sep 17 00:00:00 2001 From: Maciej Bieniek Date: Tue, 25 Jul 2023 09:13:52 +0000 Subject: [PATCH] Use device class ENUM for Tractive tracker state sensor (#97191) --- homeassistant/components/tractive/sensor.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/homeassistant/components/tractive/sensor.py b/homeassistant/components/tractive/sensor.py index 8f56d1a2e9c..b127bf8d1d7 100644 --- a/homeassistant/components/tractive/sensor.py +++ b/homeassistant/components/tractive/sensor.py @@ -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,