diff --git a/homeassistant/components/smartthings/icons.json b/homeassistant/components/smartthings/icons.json index 8c7f52d01bf..e9b17060b8f 100644 --- a/homeassistant/components/smartthings/icons.json +++ b/homeassistant/components/smartthings/icons.json @@ -82,8 +82,14 @@ "stop": "mdi:stop" } }, + "soil_level": { + "default": "mdi:liquid-spot" + }, "spin_level": { "default": "mdi:rotate-right" + }, + "water_temperature": { + "default": "mdi:water-thermometer" } }, "sensor": { diff --git a/homeassistant/components/smartthings/select.py b/homeassistant/components/smartthings/select.py index 3106aba5e49..2bdd562c8b9 100644 --- a/homeassistant/components/smartthings/select.py +++ b/homeassistant/components/smartthings/select.py @@ -56,6 +56,34 @@ WASHER_SPIN_LEVEL_TO_HA = { "1600": "1600", } +WASHER_WATER_TEMPERATURE_TO_HA = { + "none": "none", + "20": "20", + "30": "30", + "40": "40", + "50": "50", + "60": "60", + "65": "65", + "70": "70", + "75": "75", + "80": "80", + "90": "90", + "95": "95", + "tapCold": "tap_cold", + "cold": "cold", + "cool": "cool", + "ecoWarm": "eco_warm", + "warm": "warm", + "semiHot": "semi_hot", + "hot": "hot", + "extraHot": "extra_hot", + "extraLow": "extra_low", + "low": "low", + "mediumLow": "medium_low", + "medium": "medium", + "high": "high", +} + @dataclass(frozen=True, kw_only=True) class SmartThingsSelectDescription(SelectEntityDescription): @@ -147,6 +175,16 @@ CAPABILITIES_TO_SELECT: dict[Capability | str, SmartThingsSelectDescription] = { options_map=WASHER_SOIL_LEVEL_TO_HA, entity_category=EntityCategory.CONFIG, ), + Capability.CUSTOM_WASHER_WATER_TEMPERATURE: SmartThingsSelectDescription( + key=Capability.CUSTOM_WASHER_WATER_TEMPERATURE, + translation_key="water_temperature", + requires_remote_control_status=True, + options_attribute=Attribute.SUPPORTED_WASHER_WATER_TEMPERATURE, + status_attribute=Attribute.WASHER_WATER_TEMPERATURE, + command=Command.SET_WASHER_WATER_TEMPERATURE, + options_map=WASHER_WATER_TEMPERATURE_TO_HA, + entity_category=EntityCategory.CONFIG, + ), } diff --git a/homeassistant/components/smartthings/strings.json b/homeassistant/components/smartthings/strings.json index ab5cae43cd6..c8888ccfb42 100644 --- a/homeassistant/components/smartthings/strings.json +++ b/homeassistant/components/smartthings/strings.json @@ -223,6 +223,36 @@ "none": "None", "rinse_hold": "Rinse hold" } + }, + "water_temperature": { + "name": "Water temperature", + "state": { + "20": "20", + "30": "30", + "40": "40", + "50": "50", + "60": "60", + "65": "65", + "70": "70", + "75": "75", + "80": "80", + "90": "90", + "95": "95", + "cold": "Cold", + "cool": "Cool", + "eco_warm": "Eco Warm", + "extra_hot": "Extra Hot", + "extra_low": "Extra Low", + "high": "[%key:common::state::high%]", + "hot": "Hot", + "low": "[%key:common::state::low%]", + "medium": "[%key:common::state::medium%]", + "medium_low": "Medium Low", + "none": "None", + "semi_hot": "Semi Hot", + "tap_cold": "Tap Cold", + "warm": "Warm" + } } }, "sensor": { diff --git a/tests/components/smartthings/snapshots/test_select.ambr b/tests/components/smartthings/snapshots/test_select.ambr index 16956195e24..d51e89e0225 100644 --- a/tests/components/smartthings/snapshots/test_select.ambr +++ b/tests/components/smartthings/snapshots/test_select.ambr @@ -713,6 +713,71 @@ 'state': 'high', }) # --- +# name: test_all_entities[da_wm_wm_000001][select.washer_water_temperature-entry] + EntityRegistryEntrySnapshot({ + 'aliases': set({ + }), + 'area_id': None, + 'capabilities': dict({ + 'options': list([ + 'none', + 'tap_cold', + 'cold', + 'warm', + 'hot', + 'extra_hot', + ]), + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'select', + 'entity_category': , + 'entity_id': 'select.washer_water_temperature', + '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': 'Water temperature', + 'platform': 'smartthings', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'water_temperature', + 'unique_id': 'f984b91d-f250-9d42-3436-33f09a422a47_main_custom.washerWaterTemperature_washerWaterTemperature_washerWaterTemperature', + 'unit_of_measurement': None, + }) +# --- +# name: test_all_entities[da_wm_wm_000001][select.washer_water_temperature-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'friendly_name': 'Washer Water temperature', + 'options': list([ + 'none', + 'tap_cold', + 'cold', + 'warm', + 'hot', + 'extra_hot', + ]), + }), + 'context': , + 'entity_id': 'select.washer_water_temperature', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': 'warm', + }) +# --- # name: test_all_entities[da_wm_wm_000001_1][select.washing_machine-entry] EntityRegistryEntrySnapshot({ 'aliases': set({ @@ -839,6 +904,73 @@ 'state': '1400', }) # --- +# name: test_all_entities[da_wm_wm_000001_1][select.washing_machine_water_temperature-entry] + EntityRegistryEntrySnapshot({ + 'aliases': set({ + }), + 'area_id': None, + 'capabilities': dict({ + 'options': list([ + 'none', + 'cold', + '20', + '30', + '40', + '60', + '90', + ]), + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'select', + 'entity_category': , + 'entity_id': 'select.washing_machine_water_temperature', + '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': 'Water temperature', + 'platform': 'smartthings', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'water_temperature', + 'unique_id': '63803fae-cbed-f356-a063-2cf148ae3ca7_main_custom.washerWaterTemperature_washerWaterTemperature_washerWaterTemperature', + 'unit_of_measurement': None, + }) +# --- +# name: test_all_entities[da_wm_wm_000001_1][select.washing_machine_water_temperature-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'friendly_name': 'Washing Machine Water temperature', + 'options': list([ + 'none', + 'cold', + '20', + '30', + '40', + '60', + '90', + ]), + }), + 'context': , + 'entity_id': 'select.washing_machine_water_temperature', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '40', + }) +# --- # name: test_all_entities[da_wm_wm_01011][select.machine_a_laver-entry] EntityRegistryEntrySnapshot({ 'aliases': set({ @@ -1087,6 +1219,73 @@ 'state': '1000', }) # --- +# name: test_all_entities[da_wm_wm_01011][select.machine_a_laver_water_temperature-entry] + EntityRegistryEntrySnapshot({ + 'aliases': set({ + }), + 'area_id': None, + 'capabilities': dict({ + 'options': list([ + 'none', + 'cold', + '20', + '30', + '40', + '60', + '90', + ]), + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'select', + 'entity_category': , + 'entity_id': 'select.machine_a_laver_water_temperature', + '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': 'Water temperature', + 'platform': 'smartthings', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'water_temperature', + 'unique_id': 'b854ca5f-dc54-140d-6349-758b4d973c41_main_custom.washerWaterTemperature_washerWaterTemperature_washerWaterTemperature', + 'unit_of_measurement': None, + }) +# --- +# name: test_all_entities[da_wm_wm_01011][select.machine_a_laver_water_temperature-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'friendly_name': 'Machine à Laver Water temperature', + 'options': list([ + 'none', + 'cold', + '20', + '30', + '40', + '60', + '90', + ]), + }), + 'context': , + 'entity_id': 'select.machine_a_laver_water_temperature', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '40', + }) +# --- # name: test_all_entities[da_wm_wm_100001][select.washer-entry] EntityRegistryEntrySnapshot({ 'aliases': set({