From 4f97cc7b68385dd56dd2fa6a4836dca348a59702 Mon Sep 17 00:00:00 2001 From: Joost Lekkerkerker Date: Mon, 2 Mar 2026 08:33:47 +0100 Subject: [PATCH] Add sound detection sensitivity select to SmartThings (#164466) --- .../components/smartthings/icons.json | 3 + .../components/smartthings/select.py | 9 +++ .../components/smartthings/strings.json | 8 +++ .../smartthings/snapshots/test_select.ambr | 60 +++++++++++++++++++ tests/components/smartthings/test_select.py | 1 + 5 files changed, 81 insertions(+) diff --git a/homeassistant/components/smartthings/icons.json b/homeassistant/components/smartthings/icons.json index 155f0f939337..e04c4f2164c9 100644 --- a/homeassistant/components/smartthings/icons.json +++ b/homeassistant/components/smartthings/icons.json @@ -110,6 +110,9 @@ "soil_level": { "default": "mdi:liquid-spot" }, + "sound_detection_sensitivity": { + "default": "mdi:home-sound-in" + }, "spin_level": { "default": "mdi:rotate-right" }, diff --git a/homeassistant/components/smartthings/select.py b/homeassistant/components/smartthings/select.py index 1aeb3c0ad69e..d645b6b241c9 100644 --- a/homeassistant/components/smartthings/select.py +++ b/homeassistant/components/smartthings/select.py @@ -165,6 +165,15 @@ CAPABILITIES_TO_SELECT: dict[Capability | str, SmartThingsSelectDescription] = { extra_components=["hood"], capability_ignore_list=[Capability.SAMSUNG_CE_CONNECTION_STATE], ), + Capability.SAMSUNG_CE_SOUND_DETECTION_SENSITIVITY: SmartThingsSelectDescription( + key=Capability.SAMSUNG_CE_SOUND_DETECTION_SENSITIVITY, + translation_key="sound_detection_sensitivity", + options_attribute=Attribute.SUPPORTED_LEVELS, + status_attribute=Attribute.LEVEL, + command=Command.SET_LEVEL, + entity_category=EntityCategory.CONFIG, + entity_registry_enabled_default=False, + ), Capability.CUSTOM_WASHER_SPIN_LEVEL: SmartThingsSelectDescription( key=Capability.CUSTOM_WASHER_SPIN_LEVEL, translation_key="spin_level", diff --git a/homeassistant/components/smartthings/strings.json b/homeassistant/components/smartthings/strings.json index 20495caa70e5..fea2648abbac 100644 --- a/homeassistant/components/smartthings/strings.json +++ b/homeassistant/components/smartthings/strings.json @@ -256,6 +256,14 @@ "up": "Up" } }, + "sound_detection_sensitivity": { + "name": "Sound detection sensitivity", + "state": { + "high": "[%key:common::state::high%]", + "low": "[%key:common::state::low%]", + "medium": "[%key:common::state::medium%]" + } + }, "spin_level": { "name": "Spin level", "state": { diff --git a/tests/components/smartthings/snapshots/test_select.ambr b/tests/components/smartthings/snapshots/test_select.ambr index 26c0485b36b2..2838bf75a087 100644 --- a/tests/components/smartthings/snapshots/test_select.ambr +++ b/tests/components/smartthings/snapshots/test_select.ambr @@ -533,6 +533,66 @@ 'state': 'on', }) # --- +# name: test_all_entities[da_rvc_map_01011][select.robot_vacuum_sound_detection_sensitivity-entry] + EntityRegistryEntrySnapshot({ + 'aliases': set({ + }), + 'area_id': None, + 'capabilities': dict({ + 'options': list([ + 'low', + 'medium', + 'high', + ]), + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'select', + 'entity_category': , + 'entity_id': 'select.robot_vacuum_sound_detection_sensitivity', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Sound detection sensitivity', + 'options': dict({ + }), + 'original_device_class': None, + 'original_icon': None, + 'original_name': 'Sound detection sensitivity', + 'platform': 'smartthings', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'sound_detection_sensitivity', + 'unique_id': '01b28624-5907-c8bc-0325-8ad23f03a637_main_samsungce.soundDetectionSensitivity_level_level', + 'unit_of_measurement': None, + }) +# --- +# name: test_all_entities[da_rvc_map_01011][select.robot_vacuum_sound_detection_sensitivity-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'friendly_name': 'Robot Vacuum Sound detection sensitivity', + 'options': list([ + 'low', + 'medium', + 'high', + ]), + }), + 'context': , + 'entity_id': 'select.robot_vacuum_sound_detection_sensitivity', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': 'medium', + }) +# --- # name: test_all_entities[da_wm_dw_000001][select.dishwasher-entry] EntityRegistryEntrySnapshot({ 'aliases': set({ diff --git a/tests/components/smartthings/test_select.py b/tests/components/smartthings/test_select.py index 65af53a216b4..9130f8bdbc79 100644 --- a/tests/components/smartthings/test_select.py +++ b/tests/components/smartthings/test_select.py @@ -30,6 +30,7 @@ from . import ( from tests.common import MockConfigEntry +@pytest.mark.usefixtures("entity_registry_enabled_by_default") async def test_all_entities( hass: HomeAssistant, snapshot: SnapshotAssertion,