1
0
mirror of https://github.com/home-assistant/core.git synced 2025-12-24 21:06:19 +00:00

Add Washer Water Temperature to SmartThings (#156980)

Co-authored-by: mik-laj <12058428+mik-laj@users.noreply.github.com>
This commit is contained in:
Kamil Breguła
2025-11-21 13:19:08 +01:00
committed by GitHub
parent c9bd87f4b3
commit 97de944a14
4 changed files with 273 additions and 0 deletions

View File

@@ -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": {

View File

@@ -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,
),
}

View File

@@ -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": {

View File

@@ -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': <ANY>,
'config_subentry_id': <ANY>,
'device_class': None,
'device_id': <ANY>,
'disabled_by': None,
'domain': 'select',
'entity_category': <EntityCategory.CONFIG: 'config'>,
'entity_id': 'select.washer_water_temperature',
'has_entity_name': True,
'hidden_by': None,
'icon': None,
'id': <ANY>,
'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': <ANY>,
'entity_id': 'select.washer_water_temperature',
'last_changed': <ANY>,
'last_reported': <ANY>,
'last_updated': <ANY>,
'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': <ANY>,
'config_subentry_id': <ANY>,
'device_class': None,
'device_id': <ANY>,
'disabled_by': None,
'domain': 'select',
'entity_category': <EntityCategory.CONFIG: 'config'>,
'entity_id': 'select.washing_machine_water_temperature',
'has_entity_name': True,
'hidden_by': None,
'icon': None,
'id': <ANY>,
'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': <ANY>,
'entity_id': 'select.washing_machine_water_temperature',
'last_changed': <ANY>,
'last_reported': <ANY>,
'last_updated': <ANY>,
'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': <ANY>,
'config_subentry_id': <ANY>,
'device_class': None,
'device_id': <ANY>,
'disabled_by': None,
'domain': 'select',
'entity_category': <EntityCategory.CONFIG: 'config'>,
'entity_id': 'select.machine_a_laver_water_temperature',
'has_entity_name': True,
'hidden_by': None,
'icon': None,
'id': <ANY>,
'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': <ANY>,
'entity_id': 'select.machine_a_laver_water_temperature',
'last_changed': <ANY>,
'last_reported': <ANY>,
'last_updated': <ANY>,
'state': '40',
})
# ---
# name: test_all_entities[da_wm_wm_100001][select.washer-entry]
EntityRegistryEntrySnapshot({
'aliases': set({