Set options for dishwasher machine state sensor in SmartThings (#139347)

* Set options for dishwasher machine state sensor in SmartThings

* Fix
This commit is contained in:
Joost Lekkerkerker 2025-02-26 16:18:37 +01:00 committed by GitHub
parent 9262dec444
commit 37c8764426
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 22 additions and 3 deletions

View File

@ -195,6 +195,8 @@ CAPABILITY_TO_SENSORS: dict[
SmartThingsSensorEntityDescription(
key=Attribute.MACHINE_STATE,
translation_key="dishwasher_machine_state",
options=["pause", "run", "stop"],
device_class=SensorDeviceClass.ENUM,
)
],
Attribute.DISHWASHER_JOB_STATE: [

View File

@ -69,7 +69,12 @@
}
},
"dishwasher_machine_state": {
"name": "Machine state"
"name": "Machine state",
"state": {
"pause": "[%key:common::state::paused%]",
"run": "Running",
"stop": "Stopped"
}
},
"dishwasher_job_state": {
"name": "Job state",

View File

@ -2812,7 +2812,13 @@
'aliases': set({
}),
'area_id': None,
'capabilities': None,
'capabilities': dict({
'options': list([
'pause',
'run',
'stop',
]),
}),
'config_entry_id': <ANY>,
'config_subentry_id': <ANY>,
'device_class': None,
@ -2830,7 +2836,7 @@
'name': None,
'options': dict({
}),
'original_device_class': None,
'original_device_class': <SensorDeviceClass.ENUM: 'enum'>,
'original_icon': None,
'original_name': 'Machine state',
'platform': 'smartthings',
@ -2844,7 +2850,13 @@
# name: test_all_entities[da_wm_dw_000001][sensor.dishwasher_machine_state-state]
StateSnapshot({
'attributes': ReadOnlyDict({
'device_class': 'enum',
'friendly_name': 'Dishwasher Machine state',
'options': list([
'pause',
'run',
'stop',
]),
}),
'context': <ANY>,
'entity_id': 'sensor.dishwasher_machine_state',