diff --git a/homeassistant/components/smartthings/__init__.py b/homeassistant/components/smartthings/__init__.py index fb4282419ce..cf2df8813cc 100644 --- a/homeassistant/components/smartthings/__init__.py +++ b/homeassistant/components/smartthings/__init__.py @@ -505,6 +505,9 @@ KEEP_CAPABILITY_QUIRK: dict[ Capability.SAMSUNG_CE_AIR_CONDITIONER_LIGHTING: ( lambda status: status[Attribute.LIGHTING].value is not None ), + Capability.SAMSUNG_CE_AIR_CONDITIONER_BEEP: ( + lambda status: status[Attribute.BEEP].value is not None + ), } diff --git a/homeassistant/components/smartthings/icons.json b/homeassistant/components/smartthings/icons.json index 9751c1c81d2..8c7f52d01bf 100644 --- a/homeassistant/components/smartthings/icons.json +++ b/homeassistant/components/smartthings/icons.json @@ -156,6 +156,13 @@ "sanitize": { "default": "mdi:lotion" }, + "sound_effect": { + "default": "mdi:volume-high", + "state": { + "off": "mdi:volume-off", + "on": "mdi:volume-high" + } + }, "wrinkle_prevent": { "default": "mdi:tumble-dryer", "state": { diff --git a/homeassistant/components/smartthings/strings.json b/homeassistant/components/smartthings/strings.json index a4dea962511..fa2659e6d63 100644 --- a/homeassistant/components/smartthings/strings.json +++ b/homeassistant/components/smartthings/strings.json @@ -653,6 +653,9 @@ "sanitize": { "name": "Sanitize" }, + "sound_effect": { + "name": "Sound effect" + }, "wrinkle_prevent": { "name": "Wrinkle prevent" } diff --git a/homeassistant/components/smartthings/switch.py b/homeassistant/components/smartthings/switch.py index bb883d0d41c..bc2f2db9110 100644 --- a/homeassistant/components/smartthings/switch.py +++ b/homeassistant/components/smartthings/switch.py @@ -91,6 +91,15 @@ CAPABILITY_TO_COMMAND_SWITCHES: dict[ ), } CAPABILITY_TO_SWITCHES: dict[Capability | str, SmartThingsSwitchEntityDescription] = { + Capability.SAMSUNG_CE_AIR_CONDITIONER_BEEP: SmartThingsSwitchEntityDescription( + key=Capability.SAMSUNG_CE_AIR_CONDITIONER_BEEP, + translation_key="sound_effect", + status_attribute=Attribute.BEEP, + on_key="on", + on_command=Command.ON, + off_command=Command.OFF, + entity_category=EntityCategory.CONFIG, + ), Capability.SAMSUNG_CE_WASHER_BUBBLE_SOAK: SmartThingsSwitchEntityDescription( key=Capability.SAMSUNG_CE_WASHER_BUBBLE_SOAK, translation_key="bubble_soak", diff --git a/tests/components/smartthings/snapshots/test_switch.ambr b/tests/components/smartthings/snapshots/test_switch.ambr index 03f3c938abc..33b9ca5e757 100644 --- a/tests/components/smartthings/snapshots/test_switch.ambr +++ b/tests/components/smartthings/snapshots/test_switch.ambr @@ -47,6 +47,54 @@ 'state': 'on', }) # --- +# name: test_all_entities[da_ac_cac_01001][switch.ar_varanda_sound_effect-entry] + EntityRegistryEntrySnapshot({ + 'aliases': set({ + }), + 'area_id': None, + 'capabilities': None, + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'switch', + 'entity_category': , + 'entity_id': 'switch.ar_varanda_sound_effect', + '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': 'Sound effect', + 'platform': 'smartthings', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'sound_effect', + 'unique_id': '23c6d296-4656-20d8-f6eb-2ff13e041753_main_samsungce.airConditionerBeep_beep_beep', + 'unit_of_measurement': None, + }) +# --- +# name: test_all_entities[da_ac_cac_01001][switch.ar_varanda_sound_effect-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'friendly_name': 'Ar Varanda Sound effect', + }), + 'context': , + 'entity_id': 'switch.ar_varanda_sound_effect', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': 'on', + }) +# --- # name: test_all_entities[da_ac_rac_01001][switch.aire_dormitorio_principal_display_lighting-entry] EntityRegistryEntrySnapshot({ 'aliases': set({ @@ -95,6 +143,54 @@ 'state': 'on', }) # --- +# name: test_all_entities[da_ac_rac_01001][switch.aire_dormitorio_principal_sound_effect-entry] + EntityRegistryEntrySnapshot({ + 'aliases': set({ + }), + 'area_id': None, + 'capabilities': None, + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'switch', + 'entity_category': , + 'entity_id': 'switch.aire_dormitorio_principal_sound_effect', + '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': 'Sound effect', + 'platform': 'smartthings', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'sound_effect', + 'unique_id': '4ece486b-89db-f06a-d54d-748b676b4d8e_main_samsungce.airConditionerBeep_beep_beep', + 'unit_of_measurement': None, + }) +# --- +# name: test_all_entities[da_ac_rac_01001][switch.aire_dormitorio_principal_sound_effect-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'friendly_name': 'Aire Dormitorio Principal Sound effect', + }), + 'context': , + 'entity_id': 'switch.aire_dormitorio_principal_sound_effect', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': 'off', + }) +# --- # name: test_all_entities[da_ref_normal_000001][switch.refrigerator_cubed_ice-entry] EntityRegistryEntrySnapshot({ 'aliases': set({