Set device class for Oven Completion time in SmartThings (#140139)

This commit is contained in:
Joost Lekkerkerker 2025-03-08 19:58:10 +01:00 committed by Franck Nijhof
parent ee78e21950
commit 134b5319e1
No known key found for this signature in database
GPG Key ID: D62583BA8AB11CA3
2 changed files with 5 additions and 2 deletions

View File

@ -561,6 +561,8 @@ CAPABILITY_TO_SENSORS: dict[
SmartThingsSensorEntityDescription( SmartThingsSensorEntityDescription(
key=Attribute.COMPLETION_TIME, key=Attribute.COMPLETION_TIME,
translation_key="completion_time", translation_key="completion_time",
device_class=SensorDeviceClass.TIMESTAMP,
value_fn=dt_util.parse_datetime,
) )
], ],
}, },

View File

@ -1710,7 +1710,7 @@
'name': None, 'name': None,
'options': dict({ 'options': dict({
}), }),
'original_device_class': None, 'original_device_class': <SensorDeviceClass.TIMESTAMP: 'timestamp'>,
'original_icon': None, 'original_icon': None,
'original_name': 'Completion time', 'original_name': 'Completion time',
'platform': 'smartthings', 'platform': 'smartthings',
@ -1724,6 +1724,7 @@
# name: test_all_entities[da_ks_microwave_0101x][sensor.microwave_completion_time-state] # name: test_all_entities[da_ks_microwave_0101x][sensor.microwave_completion_time-state]
StateSnapshot({ StateSnapshot({
'attributes': ReadOnlyDict({ 'attributes': ReadOnlyDict({
'device_class': 'timestamp',
'friendly_name': 'Microwave Completion time', 'friendly_name': 'Microwave Completion time',
}), }),
'context': <ANY>, 'context': <ANY>,
@ -1731,7 +1732,7 @@
'last_changed': <ANY>, 'last_changed': <ANY>,
'last_reported': <ANY>, 'last_reported': <ANY>,
'last_updated': <ANY>, 'last_updated': <ANY>,
'state': '2025-02-08T21:13:36.184Z', 'state': '2025-02-08T21:13:36+00:00',
}) })
# --- # ---
# name: test_all_entities[da_ks_microwave_0101x][sensor.microwave_job_state-entry] # name: test_all_entities[da_ks_microwave_0101x][sensor.microwave_job_state-entry]