mirror of
https://github.com/home-assistant/core.git
synced 2025-07-12 07:47:08 +00:00
Set device class for Oven Completion time in SmartThings (#140139)
This commit is contained in:
parent
ee78e21950
commit
134b5319e1
@ -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,
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
@ -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]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user