Skip to content

Commit 5470d8f

Browse files
authored
Add switch for microfilter bypass mode to SmartThings (#165919)
1 parent 99fe4b1 commit 5470d8f

File tree

3 files changed

+62
-0
lines changed

3 files changed

+62
-0
lines changed

homeassistant/components/smartthings/strings.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -950,6 +950,9 @@
950950
"bubble_soak": {
951951
"name": "Bubble Soak"
952952
},
953+
"bypass_mode": {
954+
"name": "Bypass mode"
955+
},
953956
"display_lighting": {
954957
"name": "Display lighting"
955958
},

homeassistant/components/smartthings/switch.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,15 @@ class SmartThingsDishwasherWashingOptionSwitchEntityDescription(
101101
command=Command.SET_STEAM_CLOSET_AUTO_CYCLE_LINK,
102102
entity_category=EntityCategory.CONFIG,
103103
),
104+
Capability.SAMSUNG_CE_MICROFIBER_FILTER_SETTINGS: SmartThingsCommandSwitchEntityDescription(
105+
key=Capability.SAMSUNG_CE_MICROFIBER_FILTER_SETTINGS,
106+
translation_key="bypass_mode",
107+
status_attribute=Attribute.BYPASS_MODE,
108+
entity_category=EntityCategory.CONFIG,
109+
on_key="enabled",
110+
off_key="disabled",
111+
command=Command.SET_BYPASS_MODE,
112+
),
104113
}
105114
CAPABILITY_TO_SWITCHES: dict[Capability | str, SmartThingsSwitchEntityDescription] = {
106115
Capability.SAMSUNG_CE_AIR_CONDITIONER_BEEP: SmartThingsSwitchEntityDescription(

tests/components/smartthings/snapshots/test_switch.ambr

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1549,6 +1549,56 @@
15491549
'state': 'on',
15501550
})
15511551
# ---
1552+
# name: test_all_entities[da_wm_mf_01001][switch.filtro_in_microfibra_bypass_mode-entry]
1553+
EntityRegistryEntrySnapshot({
1554+
'aliases': list([
1555+
None,
1556+
]),
1557+
'area_id': None,
1558+
'capabilities': None,
1559+
'config_entry_id': <ANY>,
1560+
'config_subentry_id': <ANY>,
1561+
'device_class': None,
1562+
'device_id': <ANY>,
1563+
'disabled_by': None,
1564+
'domain': 'switch',
1565+
'entity_category': <EntityCategory.CONFIG: 'config'>,
1566+
'entity_id': 'switch.filtro_in_microfibra_bypass_mode',
1567+
'has_entity_name': True,
1568+
'hidden_by': None,
1569+
'icon': None,
1570+
'id': <ANY>,
1571+
'labels': set({
1572+
}),
1573+
'name': None,
1574+
'object_id_base': 'Bypass mode',
1575+
'options': dict({
1576+
}),
1577+
'original_device_class': None,
1578+
'original_icon': None,
1579+
'original_name': 'Bypass mode',
1580+
'platform': 'smartthings',
1581+
'previous_unique_id': None,
1582+
'suggested_object_id': None,
1583+
'supported_features': 0,
1584+
'translation_key': 'bypass_mode',
1585+
'unique_id': '42e80b4d-24c4-a810-11b3-f90375c56a39_main_samsungce.microfiberFilterSettings_bypassMode_bypassMode',
1586+
'unit_of_measurement': None,
1587+
})
1588+
# ---
1589+
# name: test_all_entities[da_wm_mf_01001][switch.filtro_in_microfibra_bypass_mode-state]
1590+
StateSnapshot({
1591+
'attributes': ReadOnlyDict({
1592+
'friendly_name': 'Filtro in microfibra Bypass mode',
1593+
}),
1594+
'context': <ANY>,
1595+
'entity_id': 'switch.filtro_in_microfibra_bypass_mode',
1596+
'last_changed': <ANY>,
1597+
'last_reported': <ANY>,
1598+
'last_updated': <ANY>,
1599+
'state': 'off',
1600+
})
1601+
# ---
15521602
# name: test_all_entities[da_wm_sc_000001][switch.airdresser_auto_cycle_link-entry]
15531603
EntityRegistryEntrySnapshot({
15541604
'aliases': list([

0 commit comments

Comments
 (0)