diff --git a/homeassistant/components/smartthings/select.py b/homeassistant/components/smartthings/select.py index b5fb27610c2..99dc7a09f87 100644 --- a/homeassistant/components/smartthings/select.py +++ b/homeassistant/components/smartthings/select.py @@ -20,6 +20,17 @@ LAMP_TO_HA = { "extraHigh": "extra_high", } +WASHER_SOIL_LEVEL_TO_HA = { + "none": "none", + "heavy": "heavy", + "normal": "normal", + "light": "light", + "extraLight": "extra_light", + "extraHeavy": "extra_heavy", + "up": "up", + "down": "down", +} + WASHER_SPIN_LEVEL_TO_HA = { "none": "none", "rinseHold": "rinse_hold", @@ -122,6 +133,15 @@ CAPABILITIES_TO_SELECT: dict[Capability | str, SmartThingsSelectDescription] = { options_map=WASHER_SPIN_LEVEL_TO_HA, entity_category=EntityCategory.CONFIG, ), + Capability.CUSTOM_WASHER_SOIL_LEVEL: SmartThingsSelectDescription( + key=Capability.CUSTOM_WASHER_SOIL_LEVEL, + translation_key="soil_level", + options_attribute=Attribute.SUPPORTED_WASHER_SOIL_LEVEL, + status_attribute=Attribute.WASHER_SOIL_LEVEL, + command=Command.SET_WASHER_SOIL_LEVEL, + options_map=WASHER_SOIL_LEVEL_TO_HA, + entity_category=EntityCategory.CONFIG, + ), } diff --git a/homeassistant/components/smartthings/strings.json b/homeassistant/components/smartthings/strings.json index 27c0eafe811..0d8e5feabc0 100644 --- a/homeassistant/components/smartthings/strings.json +++ b/homeassistant/components/smartthings/strings.json @@ -182,6 +182,19 @@ "1400": "1400", "1600": "1600" } + }, + "soil_level": { + "name": "Soil level", + "state": { + "none": "None", + "heavy": "Heavy", + "normal": "Normal", + "light": "Light", + "extra_light": "Extra light", + "extra_heavy": "Extra heavy", + "up": "Up", + "down": "Down" + } } }, "sensor": { diff --git a/tests/components/smartthings/snapshots/test_select.ambr b/tests/components/smartthings/snapshots/test_select.ambr index 58a206f109c..0ef12a3fe90 100644 --- a/tests/components/smartthings/snapshots/test_select.ambr +++ b/tests/components/smartthings/snapshots/test_select.ambr @@ -459,6 +459,70 @@ 'state': 'stop', }) # --- +# name: test_all_entities[da_wm_wm_000001][select.washer_soil_level-entry] + EntityRegistryEntrySnapshot({ + 'aliases': set({ + }), + 'area_id': None, + 'capabilities': dict({ + 'options': list([ + 'none', + 'extra_light', + 'light', + 'normal', + 'heavy', + 'extra_heavy', + ]), + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'select', + 'entity_category': , + 'entity_id': 'select.washer_soil_level', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'options': dict({ + }), + 'original_device_class': None, + 'original_icon': None, + 'original_name': 'Soil level', + 'platform': 'smartthings', + 'previous_unique_id': None, + 'supported_features': 0, + 'translation_key': 'soil_level', + 'unique_id': 'f984b91d-f250-9d42-3436-33f09a422a47_main_custom.washerSoilLevel_washerSoilLevel_washerSoilLevel', + 'unit_of_measurement': None, + }) +# --- +# name: test_all_entities[da_wm_wm_000001][select.washer_soil_level-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'friendly_name': 'Washer Soil level', + 'options': list([ + 'none', + 'extra_light', + 'light', + 'normal', + 'heavy', + 'extra_heavy', + ]), + }), + 'context': , + 'entity_id': 'select.washer_soil_level', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': 'normal', + }) +# --- # name: test_all_entities[da_wm_wm_000001][select.washer_spin_level-entry] EntityRegistryEntrySnapshot({ 'aliases': set({