Add translatable states to robot cleaner cleaning mode in SmartThings (#139362)

* Add translatable states to robot cleaner cleaning mode in SmartThings

* Update homeassistant/components/smartthings/strings.json

* Update homeassistant/components/smartthings/strings.json

---------

Co-authored-by: Josef Zweck <josef@zweck.dev>
This commit is contained in:
Joost Lekkerkerker 2025-02-26 17:33:13 +01:00 committed by GitHub
parent cadee73da8
commit 5e5fd6a2f2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 31 additions and 3 deletions

View File

@ -620,6 +620,8 @@ CAPABILITY_TO_SENSORS: dict[
SmartThingsSensorEntityDescription(
key=Attribute.ROBOT_CLEANER_CLEANING_MODE,
translation_key="robot_cleaner_cleaning_mode",
options=["auto", "part", "repeat", "manual", "stop", "map"],
device_class=SensorDeviceClass.ENUM,
entity_category=EntityCategory.DIAGNOSTIC,
)
],

View File

@ -252,7 +252,15 @@
"name": "[%key:component::smartthings::entity::sensor::oven_setpoint::name%]"
},
"robot_cleaner_cleaning_mode": {
"name": "Cleaning mode"
"name": "Cleaning mode",
"state": {
"auto": "Auto",
"part": "Partial",
"repeat": "Repeat",
"manual": "Manual",
"stop": "[%key:common::action::stop%]",
"map": "Map"
}
},
"robot_cleaner_movement": {
"name": "Movement",

View File

@ -2516,7 +2516,16 @@
'aliases': set({
}),
'area_id': None,
'capabilities': None,
'capabilities': dict({
'options': list([
'auto',
'part',
'repeat',
'manual',
'stop',
'map',
]),
}),
'config_entry_id': <ANY>,
'config_subentry_id': <ANY>,
'device_class': None,
@ -2534,7 +2543,7 @@
'name': None,
'options': dict({
}),
'original_device_class': None,
'original_device_class': <SensorDeviceClass.ENUM: 'enum'>,
'original_icon': None,
'original_name': 'Cleaning mode',
'platform': 'smartthings',
@ -2548,7 +2557,16 @@
# name: test_all_entities[da_rvc_normal_000001][sensor.robot_vacuum_cleaning_mode-state]
StateSnapshot({
'attributes': ReadOnlyDict({
'device_class': 'enum',
'friendly_name': 'Robot vacuum Cleaning mode',
'options': list([
'auto',
'part',
'repeat',
'manual',
'stop',
'map',
]),
}),
'context': <ANY>,
'entity_id': 'sensor.robot_vacuum_cleaning_mode',