Add Sabbath mode to SmartThings (#141072)

This commit is contained in:
Joost Lekkerkerker 2025-04-30 15:39:23 +02:00 committed by GitHub
parent af66d0b647
commit 923300f4e7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 55 additions and 0 deletions

View File

@ -478,6 +478,9 @@
},
"ice_maker": {
"name": "Ice maker"
},
"sabbath_mode": {
"name": "Sabbath mode"
}
}
},

View File

@ -87,6 +87,11 @@ CAPABILITY_TO_SWITCHES: dict[Capability | str, SmartThingsSwitchEntityDescriptio
"icemaker": "ice_maker",
},
),
Capability.SAMSUNG_CE_SABBATH_MODE: SmartThingsSwitchEntityDescription(
key=Capability.SAMSUNG_CE_SABBATH_MODE,
translation_key="sabbath_mode",
status_attribute=Attribute.STATUS,
),
}

View File

@ -93,6 +93,53 @@
'state': 'off',
})
# ---
# name: test_all_entities[da_ref_normal_000001][switch.refrigerator_sabbath_mode-entry]
EntityRegistryEntrySnapshot({
'aliases': set({
}),
'area_id': None,
'capabilities': None,
'config_entry_id': <ANY>,
'config_subentry_id': <ANY>,
'device_class': None,
'device_id': <ANY>,
'disabled_by': None,
'domain': 'switch',
'entity_category': None,
'entity_id': 'switch.refrigerator_sabbath_mode',
'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': 'Sabbath mode',
'platform': 'smartthings',
'previous_unique_id': None,
'supported_features': 0,
'translation_key': 'sabbath_mode',
'unique_id': '7db87911-7dce-1cf2-7119-b953432a2f09_main_samsungce.sabbathMode_status_status',
'unit_of_measurement': None,
})
# ---
# name: test_all_entities[da_ref_normal_000001][switch.refrigerator_sabbath_mode-state]
StateSnapshot({
'attributes': ReadOnlyDict({
'friendly_name': 'Refrigerator Sabbath mode',
}),
'context': <ANY>,
'entity_id': 'switch.refrigerator_sabbath_mode',
'last_changed': <ANY>,
'last_reported': <ANY>,
'last_updated': <ANY>,
'state': 'off',
})
# ---
# name: test_all_entities[da_ref_normal_01001][switch.refrigerator_ice_maker-entry]
EntityRegistryEntrySnapshot({
'aliases': set({