Add cooktop operating state to SmartThings (#144500)

This commit is contained in:
Joost Lekkerkerker 2025-05-08 20:41:04 +02:00 committed by GitHub
parent cb6847b64c
commit 7ee9f0af2d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 146 additions and 0 deletions

View File

@ -48,6 +48,17 @@
"default": "mdi:car-coolant-level"
}
},
"sensor": {
"cooktop_operating_state": {
"default": "mdi:stove",
"state": {
"ready": "mdi:play-speed",
"run": "mdi:play",
"paused": "mdi:pause",
"finished": "mdi:food-turkey"
}
}
},
"switch": {
"bubble_soak": {
"default": "mdi:water-off",

View File

@ -265,6 +265,16 @@ CAPABILITY_TO_SENSORS: dict[
)
]
},
Capability.CUSTOM_COOKTOP_OPERATING_STATE: {
Attribute.COOKTOP_OPERATING_STATE: [
SmartThingsSensorEntityDescription(
key=Attribute.COOKTOP_OPERATING_STATE,
translation_key="cooktop_operating_state",
device_class=SensorDeviceClass.ENUM,
options_attribute=Attribute.SUPPORTED_COOKTOP_OPERATING_STATE,
)
]
},
Capability.DISHWASHER_OPERATING_STATE: {
Attribute.MACHINE_STATE: [
SmartThingsSensorEntityDescription(

View File

@ -172,6 +172,15 @@
"tested": "Tested"
}
},
"cooktop_operating_state": {
"name": "Operating state",
"state": {
"ready": "[%key:component::smartthings::entity::sensor::oven_machine_state::state::ready%]",
"run": "[%key:component::smartthings::entity::sensor::dishwasher_machine_state::state::run%]",
"paused": "[%key:common::state::paused%]",
"finished": "[%key:component::smartthings::entity::sensor::oven_job_state::state::finished%]"
}
},
"dishwasher_machine_state": {
"name": "Machine state",
"state": {

View File

@ -2578,6 +2578,65 @@
'state': '27',
})
# ---
# name: test_all_entities[da_ks_cooktop_31001][sensor.induction_hob_operating_state-entry]
EntityRegistryEntrySnapshot({
'aliases': set({
}),
'area_id': None,
'capabilities': dict({
'options': list([
'ready',
'run',
'paused',
]),
}),
'config_entry_id': <ANY>,
'config_subentry_id': <ANY>,
'device_class': None,
'device_id': <ANY>,
'disabled_by': None,
'domain': 'sensor',
'entity_category': None,
'entity_id': 'sensor.induction_hob_operating_state',
'has_entity_name': True,
'hidden_by': None,
'icon': None,
'id': <ANY>,
'labels': set({
}),
'name': None,
'options': dict({
}),
'original_device_class': <SensorDeviceClass.ENUM: 'enum'>,
'original_icon': None,
'original_name': 'Operating state',
'platform': 'smartthings',
'previous_unique_id': None,
'supported_features': 0,
'translation_key': 'cooktop_operating_state',
'unique_id': '808dbd84-f357-47e2-a0cd-3b66fa22d584_main_custom.cooktopOperatingState_cooktopOperatingState_cooktopOperatingState',
'unit_of_measurement': None,
})
# ---
# name: test_all_entities[da_ks_cooktop_31001][sensor.induction_hob_operating_state-state]
StateSnapshot({
'attributes': ReadOnlyDict({
'device_class': 'enum',
'friendly_name': 'Induction Hob Operating state',
'options': list([
'ready',
'run',
'paused',
]),
}),
'context': <ANY>,
'entity_id': 'sensor.induction_hob_operating_state',
'last_changed': <ANY>,
'last_reported': <ANY>,
'last_updated': <ANY>,
'state': 'ready',
})
# ---
# name: test_all_entities[da_ks_microwave_0101x][sensor.microwave_completion_time-entry]
EntityRegistryEntrySnapshot({
'aliases': set({
@ -3568,6 +3627,63 @@
'state': 'running',
})
# ---
# name: test_all_entities[da_ks_range_0101x][sensor.vulcan_operating_state-entry]
EntityRegistryEntrySnapshot({
'aliases': set({
}),
'area_id': None,
'capabilities': dict({
'options': list([
'run',
'ready',
]),
}),
'config_entry_id': <ANY>,
'config_subentry_id': <ANY>,
'device_class': None,
'device_id': <ANY>,
'disabled_by': None,
'domain': 'sensor',
'entity_category': None,
'entity_id': 'sensor.vulcan_operating_state',
'has_entity_name': True,
'hidden_by': None,
'icon': None,
'id': <ANY>,
'labels': set({
}),
'name': None,
'options': dict({
}),
'original_device_class': <SensorDeviceClass.ENUM: 'enum'>,
'original_icon': None,
'original_name': 'Operating state',
'platform': 'smartthings',
'previous_unique_id': None,
'supported_features': 0,
'translation_key': 'cooktop_operating_state',
'unique_id': '2c3cbaa0-1899-5ddc-7b58-9d657bd48f18_main_custom.cooktopOperatingState_cooktopOperatingState_cooktopOperatingState',
'unit_of_measurement': None,
})
# ---
# name: test_all_entities[da_ks_range_0101x][sensor.vulcan_operating_state-state]
StateSnapshot({
'attributes': ReadOnlyDict({
'device_class': 'enum',
'friendly_name': 'Vulcan Operating state',
'options': list([
'run',
'ready',
]),
}),
'context': <ANY>,
'entity_id': 'sensor.vulcan_operating_state',
'last_changed': <ANY>,
'last_reported': <ANY>,
'last_updated': <ANY>,
'state': 'ready',
})
# ---
# name: test_all_entities[da_ks_range_0101x][sensor.vulcan_oven_mode-entry]
EntityRegistryEntrySnapshot({
'aliases': set({