Add translatable states to dryer machine state in Smartthings (#139369)

This commit is contained in:
Joost Lekkerkerker 2025-02-26 18:14:59 +01:00 committed by GitHub
parent 5be7f49146
commit 561b3ae21b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 22 additions and 3 deletions

View File

@ -304,6 +304,8 @@ CAPABILITY_TO_SENSORS: dict[
SmartThingsSensorEntityDescription(
key=Attribute.MACHINE_STATE,
translation_key="dryer_machine_state",
options=WASHER_OPTIONS,
device_class=SensorDeviceClass.ENUM,
)
],
Attribute.DRYER_JOB_STATE: [

View File

@ -104,7 +104,12 @@
"name": "Dryer mode"
},
"dryer_machine_state": {
"name": "[%key:component::smartthings::entity::sensor::dishwasher_machine_state::name%]"
"name": "[%key:component::smartthings::entity::sensor::dishwasher_machine_state::name%]",
"state": {
"pause": "[%key:common::state::paused%]",
"run": "[%key:component::smartthings::entity::sensor::dishwasher_machine_state::state::run%]",
"stop": "[%key:component::smartthings::entity::sensor::dishwasher_machine_state::state::stop%]"
}
},
"dryer_job_state": {
"name": "[%key:component::smartthings::entity::sensor::dishwasher_job_state::name%]"

View File

@ -3408,7 +3408,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,
@ -3426,7 +3432,7 @@
'name': None,
'options': dict({
}),
'original_device_class': None,
'original_device_class': <SensorDeviceClass.ENUM: 'enum'>,
'original_icon': None,
'original_name': 'Machine state',
'platform': 'smartthings',
@ -3440,7 +3446,13 @@
# name: test_all_entities[da_wm_wd_000001][sensor.dryer_machine_state-state]
StateSnapshot({
'attributes': ReadOnlyDict({
'device_class': 'enum',
'friendly_name': 'Dryer Machine state',
'options': list([
'pause',
'run',
'stop',
]),
}),
'context': <ANY>,
'entity_id': 'sensor.dryer_machine_state',