1
0
mirror of https://github.com/home-assistant/core.git synced 2026-04-02 08:26:41 +01:00

Add entities for stick vacuum cleaner to SmartThings (#166127)

This commit is contained in:
Joost Lekkerkerker
2026-03-25 16:28:20 +01:00
committed by GitHub
parent 686ab66a52
commit 7f0f038bcd
7 changed files with 413 additions and 0 deletions

View File

@@ -227,6 +227,25 @@ CAPABILITY_TO_SENSORS: dict[
entity_category=EntityCategory.DIAGNOSTIC,
)
},
Capability.SAMSUNG_CE_STICK_CLEANER_DUST_BAG: {
Attribute.STATUS: SmartThingsBinarySensorEntityDescription(
key=Attribute.STATUS,
is_on_key="full",
component_translation_key={
"station": "stick_cleaner_dust_bag",
},
device_class=BinarySensorDeviceClass.PROBLEM,
exists_fn=lambda component, _: component == "station",
)
},
Capability.SAMSUNG_CE_STICK_CLEANER_STICK_STATUS: {
Attribute.STATUS: SmartThingsBinarySensorEntityDescription(
key=Attribute.STATUS,
is_on_key="charging",
device_class=BinarySensorDeviceClass.BATTERY_CHARGING,
entity_category=EntityCategory.DIAGNOSTIC,
)
},
}

View File

@@ -135,6 +135,14 @@ HEALTH_CONCERN = {
"hazardous": "hazardous",
}
STICK_CLEANER_STATUS = {
"ready": "ready",
"usingVacuum": "using_vacuum",
"emptyingDustbin": "emptying_dustbin",
"UVCleaning": "uv_cleaning",
"UVPaused": "uv_paused",
}
WASHER_OPTIONS = ["pause", "run", "stop"]
@@ -1239,6 +1247,39 @@ CAPABILITY_TO_SENSORS: dict[
)
],
},
Capability.SAMSUNG_CE_STICK_CLEANER_DUST_BAG: {
Attribute.USAGE: [
SmartThingsSensorEntityDescription(
key=Attribute.USAGE,
translation_key="stick_cleaner_dust_bag_usage",
state_class=SensorStateClass.TOTAL_INCREASING,
entity_category=EntityCategory.DIAGNOSTIC,
component_fn=lambda component: component == "station",
)
]
},
Capability.SAMSUNG_CE_STICK_CLEANER_STATUS: {
Attribute.OPERATING_STATE: [
SmartThingsSensorEntityDescription(
key=Attribute.OPERATING_STATE,
name=None,
translation_key="stick_cleaner_operating_state",
options=list(STICK_CLEANER_STATUS.values()),
device_class=SensorDeviceClass.ENUM,
)
]
},
Capability.SAMSUNG_CE_STICK_CLEANER_DUSTBIN_STATUS: {
Attribute.LAST_EMPTIED_TIME: [
SmartThingsSensorEntityDescription(
key=Attribute.LAST_EMPTIED_TIME,
translation_key="stick_cleaner_dustbin_last_emptied",
device_class=SensorDeviceClass.TIMESTAMP,
entity_category=EntityCategory.DIAGNOSTIC,
value_fn=lambda value: dt_util.parse_datetime(value) if value else None,
)
]
},
}

View File

@@ -85,6 +85,9 @@
"robot_cleaner_dust_bag": {
"name": "Dust bag full"
},
"stick_cleaner_dust_bag": {
"name": "[%key:component::smartthings::entity::binary_sensor::robot_cleaner_dust_bag::name%]"
},
"stick_cleaner_status": {
"name": "Stick cleaner in station"
},
@@ -836,6 +839,22 @@
"tested": "[%key:component::smartthings::entity::sensor::carbon_monoxide_detector::state::tested%]"
}
},
"stick_cleaner_dust_bag_usage": {
"name": "Dust bag cycles",
"unit_of_measurement": "cycles"
},
"stick_cleaner_dustbin_last_emptied": {
"name": "Last emptied"
},
"stick_cleaner_operating_state": {
"state": {
"emptying_dustbin": "Emptying dustbin",
"ready": "[%key:component::smartthings::entity::sensor::oven_machine_state::state::ready%]",
"using_vacuum": "Using vacuum",
"uv_cleaning": "UV cleaning",
"uv_paused": "UV paused"
}
},
"thermostat_cooling_setpoint": {
"name": "Cooling setpoint"
},
@@ -965,6 +984,9 @@
"dry_plus": {
"name": "Dry plus"
},
"empty_dustbin": {
"name": "Empty dustbin"
},
"heated_dry": {
"name": "Heated dry"
},

View File

@@ -188,6 +188,14 @@ CAPABILITY_TO_SWITCHES: dict[Capability | str, SmartThingsSwitchEntityDescriptio
on_command=Command.ENABLE_SOUND_DETECTION,
off_command=Command.DISABLE_SOUND_DETECTION,
),
Capability.SAMSUNG_CE_STICK_CLEANER_DUSTBIN_STATUS: SmartThingsSwitchEntityDescription(
key=Capability.SAMSUNG_CE_STICK_CLEANER_DUSTBIN_STATUS,
translation_key="empty_dustbin",
status_attribute=Attribute.OPERATING_STATE,
on_key="emptying",
on_command=Command.START_EMPTYING,
off_command=Command.STOP_EMPTYING,
),
}
DISHWASHER_WASHING_OPTIONS_TO_SWITCHES: dict[
Attribute | str, SmartThingsDishwasherWashingOptionSwitchEntityDescription

View File

@@ -2227,6 +2227,108 @@
'state': 'off',
})
# ---
# name: test_all_entities[da_vc_stick_01001][binary_sensor.stick_vacuum_charging-entry]
EntityRegistryEntrySnapshot({
'aliases': list([
None,
]),
'area_id': None,
'capabilities': None,
'config_entry_id': <ANY>,
'config_subentry_id': <ANY>,
'device_class': None,
'device_id': <ANY>,
'disabled_by': None,
'domain': 'binary_sensor',
'entity_category': <EntityCategory.DIAGNOSTIC: 'diagnostic'>,
'entity_id': 'binary_sensor.stick_vacuum_charging',
'has_entity_name': True,
'hidden_by': None,
'icon': None,
'id': <ANY>,
'labels': set({
}),
'name': None,
'object_id_base': 'Charging',
'options': dict({
}),
'original_device_class': <BinarySensorDeviceClass.BATTERY_CHARGING: 'battery_charging'>,
'original_icon': None,
'original_name': 'Charging',
'platform': 'smartthings',
'previous_unique_id': None,
'suggested_object_id': None,
'supported_features': 0,
'translation_key': None,
'unique_id': 'e1f93c0c-6fe0-c65a-a314-c8f7b163c86b_main_samsungce.stickCleanerStickStatus_status_status',
'unit_of_measurement': None,
})
# ---
# name: test_all_entities[da_vc_stick_01001][binary_sensor.stick_vacuum_charging-state]
StateSnapshot({
'attributes': ReadOnlyDict({
'device_class': 'battery_charging',
'friendly_name': 'Stick vacuum Charging',
}),
'context': <ANY>,
'entity_id': 'binary_sensor.stick_vacuum_charging',
'last_changed': <ANY>,
'last_reported': <ANY>,
'last_updated': <ANY>,
'state': 'on',
})
# ---
# name: test_all_entities[da_vc_stick_01001][binary_sensor.stick_vacuum_dust_bag_full-entry]
EntityRegistryEntrySnapshot({
'aliases': list([
None,
]),
'area_id': None,
'capabilities': None,
'config_entry_id': <ANY>,
'config_subentry_id': <ANY>,
'device_class': None,
'device_id': <ANY>,
'disabled_by': None,
'domain': 'binary_sensor',
'entity_category': None,
'entity_id': 'binary_sensor.stick_vacuum_dust_bag_full',
'has_entity_name': True,
'hidden_by': None,
'icon': None,
'id': <ANY>,
'labels': set({
}),
'name': None,
'object_id_base': 'Dust bag full',
'options': dict({
}),
'original_device_class': <BinarySensorDeviceClass.PROBLEM: 'problem'>,
'original_icon': None,
'original_name': 'Dust bag full',
'platform': 'smartthings',
'previous_unique_id': None,
'suggested_object_id': None,
'supported_features': 0,
'translation_key': 'stick_cleaner_dust_bag',
'unique_id': 'e1f93c0c-6fe0-c65a-a314-c8f7b163c86b_station_samsungce.stickCleanerDustBag_status_status',
'unit_of_measurement': None,
})
# ---
# name: test_all_entities[da_vc_stick_01001][binary_sensor.stick_vacuum_dust_bag_full-state]
StateSnapshot({
'attributes': ReadOnlyDict({
'device_class': 'problem',
'friendly_name': 'Stick vacuum Dust bag full',
}),
'context': <ANY>,
'entity_id': 'binary_sensor.stick_vacuum_dust_bag_full',
'last_changed': <ANY>,
'last_reported': <ANY>,
'last_updated': <ANY>,
'state': 'off',
})
# ---
# name: test_all_entities[da_vc_stick_01001][binary_sensor.stick_vacuum_stick_cleaner_in_station-entry]
EntityRegistryEntrySnapshot({
'aliases': list([

View File

@@ -13445,6 +13445,72 @@
'state': 'room',
})
# ---
# name: test_all_entities[da_vc_stick_01001][sensor.stick_vacuum-entry]
EntityRegistryEntrySnapshot({
'aliases': list([
None,
]),
'area_id': None,
'capabilities': dict({
'options': list([
'ready',
'using_vacuum',
'emptying_dustbin',
'uv_cleaning',
'uv_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.stick_vacuum',
'has_entity_name': True,
'hidden_by': None,
'icon': None,
'id': <ANY>,
'labels': set({
}),
'name': None,
'object_id_base': None,
'options': dict({
}),
'original_device_class': <SensorDeviceClass.ENUM: 'enum'>,
'original_icon': None,
'original_name': None,
'platform': 'smartthings',
'previous_unique_id': None,
'suggested_object_id': None,
'supported_features': 0,
'translation_key': 'stick_cleaner_operating_state',
'unique_id': 'e1f93c0c-6fe0-c65a-a314-c8f7b163c86b_main_samsungce.stickCleanerStatus_operatingState_operatingState',
'unit_of_measurement': None,
})
# ---
# name: test_all_entities[da_vc_stick_01001][sensor.stick_vacuum-state]
StateSnapshot({
'attributes': ReadOnlyDict({
'device_class': 'enum',
'friendly_name': 'Stick vacuum',
'options': list([
'ready',
'using_vacuum',
'emptying_dustbin',
'uv_cleaning',
'uv_paused',
]),
}),
'context': <ANY>,
'entity_id': 'sensor.stick_vacuum',
'last_changed': <ANY>,
'last_reported': <ANY>,
'last_updated': <ANY>,
'state': 'ready',
})
# ---
# name: test_all_entities[da_vc_stick_01001][sensor.stick_vacuum_battery-entry]
EntityRegistryEntrySnapshot({
'aliases': list([
@@ -13497,6 +13563,60 @@
'state': '80',
})
# ---
# name: test_all_entities[da_vc_stick_01001][sensor.stick_vacuum_dust_bag_cycles-entry]
EntityRegistryEntrySnapshot({
'aliases': list([
None,
]),
'area_id': None,
'capabilities': dict({
'state_class': <SensorStateClass.TOTAL_INCREASING: 'total_increasing'>,
}),
'config_entry_id': <ANY>,
'config_subentry_id': <ANY>,
'device_class': None,
'device_id': <ANY>,
'disabled_by': None,
'domain': 'sensor',
'entity_category': <EntityCategory.DIAGNOSTIC: 'diagnostic'>,
'entity_id': 'sensor.stick_vacuum_dust_bag_cycles',
'has_entity_name': True,
'hidden_by': None,
'icon': None,
'id': <ANY>,
'labels': set({
}),
'name': None,
'object_id_base': 'Dust bag cycles',
'options': dict({
}),
'original_device_class': None,
'original_icon': None,
'original_name': 'Dust bag cycles',
'platform': 'smartthings',
'previous_unique_id': None,
'suggested_object_id': None,
'supported_features': 0,
'translation_key': 'stick_cleaner_dust_bag_usage',
'unique_id': 'e1f93c0c-6fe0-c65a-a314-c8f7b163c86b_station_samsungce.stickCleanerDustBag_usage_usage',
'unit_of_measurement': 'cycles',
})
# ---
# name: test_all_entities[da_vc_stick_01001][sensor.stick_vacuum_dust_bag_cycles-state]
StateSnapshot({
'attributes': ReadOnlyDict({
'friendly_name': 'Stick vacuum Dust bag cycles',
'state_class': <SensorStateClass.TOTAL_INCREASING: 'total_increasing'>,
'unit_of_measurement': 'cycles',
}),
'context': <ANY>,
'entity_id': 'sensor.stick_vacuum_dust_bag_cycles',
'last_changed': <ANY>,
'last_reported': <ANY>,
'last_updated': <ANY>,
'state': '343',
})
# ---
# name: test_all_entities[da_vc_stick_01001][sensor.stick_vacuum_energy-entry]
EntityRegistryEntrySnapshot({
'aliases': list([
@@ -13671,6 +13791,57 @@
'state': '0.0',
})
# ---
# name: test_all_entities[da_vc_stick_01001][sensor.stick_vacuum_last_emptied-entry]
EntityRegistryEntrySnapshot({
'aliases': list([
None,
]),
'area_id': None,
'capabilities': None,
'config_entry_id': <ANY>,
'config_subentry_id': <ANY>,
'device_class': None,
'device_id': <ANY>,
'disabled_by': None,
'domain': 'sensor',
'entity_category': <EntityCategory.DIAGNOSTIC: 'diagnostic'>,
'entity_id': 'sensor.stick_vacuum_last_emptied',
'has_entity_name': True,
'hidden_by': None,
'icon': None,
'id': <ANY>,
'labels': set({
}),
'name': None,
'object_id_base': 'Last emptied',
'options': dict({
}),
'original_device_class': <SensorDeviceClass.TIMESTAMP: 'timestamp'>,
'original_icon': None,
'original_name': 'Last emptied',
'platform': 'smartthings',
'previous_unique_id': None,
'suggested_object_id': None,
'supported_features': 0,
'translation_key': 'stick_cleaner_dustbin_last_emptied',
'unique_id': 'e1f93c0c-6fe0-c65a-a314-c8f7b163c86b_main_samsungce.stickCleanerDustbinStatus_lastEmptiedTime_lastEmptiedTime',
'unit_of_measurement': None,
})
# ---
# name: test_all_entities[da_vc_stick_01001][sensor.stick_vacuum_last_emptied-state]
StateSnapshot({
'attributes': ReadOnlyDict({
'device_class': 'timestamp',
'friendly_name': 'Stick vacuum Last emptied',
}),
'context': <ANY>,
'entity_id': 'sensor.stick_vacuum_last_emptied',
'last_changed': <ANY>,
'last_reported': <ANY>,
'last_updated': <ANY>,
'state': '2026-03-21T15:25:00+00:00',
})
# ---
# name: test_all_entities[da_vc_stick_01001][sensor.stick_vacuum_power-entry]
EntityRegistryEntrySnapshot({
'aliases': list([

View File

@@ -1249,6 +1249,56 @@
'state': 'off',
})
# ---
# name: test_all_entities[da_vc_stick_01001][switch.stick_vacuum_empty_dustbin-entry]
EntityRegistryEntrySnapshot({
'aliases': list([
None,
]),
'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.stick_vacuum_empty_dustbin',
'has_entity_name': True,
'hidden_by': None,
'icon': None,
'id': <ANY>,
'labels': set({
}),
'name': None,
'object_id_base': 'Empty dustbin',
'options': dict({
}),
'original_device_class': None,
'original_icon': None,
'original_name': 'Empty dustbin',
'platform': 'smartthings',
'previous_unique_id': None,
'suggested_object_id': None,
'supported_features': 0,
'translation_key': 'empty_dustbin',
'unique_id': 'e1f93c0c-6fe0-c65a-a314-c8f7b163c86b_main_samsungce.stickCleanerDustbinStatus_operatingState_operatingState',
'unit_of_measurement': None,
})
# ---
# name: test_all_entities[da_vc_stick_01001][switch.stick_vacuum_empty_dustbin-state]
StateSnapshot({
'attributes': ReadOnlyDict({
'friendly_name': 'Stick vacuum Empty dustbin',
}),
'context': <ANY>,
'entity_id': 'switch.stick_vacuum_empty_dustbin',
'last_changed': <ANY>,
'last_reported': <ANY>,
'last_updated': <ANY>,
'state': 'off',
})
# ---
# name: test_all_entities[da_wm_dw_000001][switch.dishwasher_high_temp_wash-entry]
EntityRegistryEntrySnapshot({
'aliases': list([