Add SmartThings capability for Washer soil level (#145041)

This commit is contained in:
Joost Lekkerkerker 2025-05-21 20:27:38 +02:00 committed by GitHub
parent 3c93f6e3f9
commit 39a5341ab8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 97 additions and 0 deletions

View File

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

View File

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

View File

@ -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': <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_soil_level',
'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': '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': <ANY>,
'entity_id': 'select.washer_soil_level',
'last_changed': <ANY>,
'last_reported': <ANY>,
'last_updated': <ANY>,
'state': 'normal',
})
# ---
# name: test_all_entities[da_wm_wm_000001][select.washer_spin_level-entry]
EntityRegistryEntrySnapshot({
'aliases': set({