Report whether the auto-clean cycle is running, and how far through

`/option/autoclean/vs/0` carries three fields and only `settingStatus` was read.
That one says the feature is enabled, which it is whether or not the unit is
drying right now, so nothing reported an actual cycle.

    settingStatus: On      <- the existing auto_clean switch
    status:        Stop    supportedStatus: [Start, Stop]
    progress:      0

Adds a binary sensor for `status` and a percentage sensor for `progress`.

Measured on a TP1X_DA-AC-CAC-01001, sampling the resource every eight seconds
across a cycle: `Start` with progress 98 while it ran, then `Stop` with progress 0
the moment it finished. The percentage matches the figure the appliance shows on
its own display, checked against 55% mid-run.

Golden state keys updated for the 18 fixtures that bind AUTO_CLEAN. The change is
additive — no key was removed from any of them.

Full suite passes (1070 tests, Python 3.13 via requirements-dev.txt).
This commit is contained in:
Geunwon Mo committed 2026-08-02 22:01:27 +09:00
1 parent 93744e80f4
commit 5c275753d4
22 files changed
+73

No files matched your search

@@ -742,6 +742,25 @@ AUTO_CLEAN = Capability(
write_fn=lambda p, rep, href=None: ( write_fn=lambda p, rep, href=None: (
['option', 'autoclean', 'vs', '0'], ['option', 'autoclean', 'vs', '0'],
{'x.com.samsung.da.settingStatus': 'On' if p == 'On' else 'Off'})), {'x.com.samsung.da.settingStatus': 'On' if p == 'On' else 'Off'})),
# The cycle, as opposed to the switch above -- `settingStatus` says the
# feature is enabled, which it is whether or not the unit is drying right
# now. `status` is the run state, and the resource advertises exactly
# Start/Stop in `supportedStatus`. Observed on a TP1X_DA-AC-CAC-01001:
# 'Start' with progress 98 while a cycle ran, then 'Stop' with progress 0
# the moment it finished.
BinarySensorDesc(key='auto_clean_running',
field='x.com.samsung.da.status',
icon='mdi:spray-bottle',
entity_category='diagnostic',
value_fn=lambda v: v == 'Start'),
# Percent through that cycle, matching the figure the appliance shows on
# its own display (checked against 55% mid-run).
SensorDesc(key='auto_clean_progress',
field='x.com.samsung.da.progress',
icon='mdi:progress-clock',
unit='%', state_class='measurement',
entity_category='diagnostic',
value_fn=common.int_or_none),
), ),
) )
@@ -1,6 +1,9 @@
{ {
"entity": { "entity": {
"binary_sensor": { "binary_sensor": {
"auto_clean_running": {
"name": "Automatické čištění probíhá"
},
"after_run_active": { "after_run_active": {
"name": "Dosoušení aktivní" "name": "Dosoušení aktivní"
}, },
@@ -615,6 +618,9 @@
} }
}, },
"sensor": { "sensor": {
"auto_clean_progress": {
"name": "Průběh automatického čištění"
},
"after_run_progress": { "after_run_progress": {
"name": "Průběh dosoušení" "name": "Průběh dosoušení"
}, },
@@ -1,6 +1,9 @@
{ {
"entity": { "entity": {
"binary_sensor": { "binary_sensor": {
"auto_clean_running": {
"name": "Auto clean running"
},
"after_run_active": { "after_run_active": {
"name": "After run active" "name": "After run active"
}, },
@@ -615,6 +618,9 @@
} }
}, },
"sensor": { "sensor": {
"auto_clean_progress": {
"name": "Auto clean progress"
},
"after_run_progress": { "after_run_progress": {
"name": "After run progress" "name": "After run progress"
}, },
@@ -1,6 +1,9 @@
{ {
"entity": { "entity": {
"binary_sensor": { "binary_sensor": {
"auto_clean_running": {
"name": "Auto clean actief"
},
"after_run_active": { "after_run_active": {
"name": "Nadraaien actief" "name": "Nadraaien actief"
}, },
@@ -615,6 +618,9 @@
} }
}, },
"sensor": { "sensor": {
"auto_clean_progress": {
"name": "Auto clean voortgang"
},
"after_run_progress": { "after_run_progress": {
"name": "Voortgang nadraaien" "name": "Voortgang nadraaien"
}, },
+2
View File
@@ -6,6 +6,8 @@
"air_purify", "air_purify",
"alarm_code", "alarm_code",
"auto_clean", "auto_clean",
"auto_clean_progress",
"auto_clean_running",
"beep", "beep",
"clean_level", "clean_level",
"climate", "climate",
@@ -5,6 +5,8 @@
"air_filter_usage_hours", "air_filter_usage_hours",
"alarm_code", "alarm_code",
"auto_clean", "auto_clean",
"auto_clean_progress",
"auto_clean_running",
"beep", "beep",
"climate", "climate",
"current_temperature_c", "current_temperature_c",
+2
View File
@@ -8,6 +8,8 @@
"air_purify", "air_purify",
"alarm_code", "alarm_code",
"auto_clean", "auto_clean",
"auto_clean_progress",
"auto_clean_running",
"clean_level", "clean_level",
"climate", "climate",
"current_temperature_c", "current_temperature_c",
+2
View File
@@ -5,6 +5,8 @@
"air_filter_usage_hours", "air_filter_usage_hours",
"alarm_code", "alarm_code",
"auto_clean", "auto_clean",
"auto_clean_progress",
"auto_clean_running",
"beep", "beep",
"climate", "climate",
"current_temperature_c", "current_temperature_c",
+2
View File
@@ -6,6 +6,8 @@
"air_filter_usage_hours", "air_filter_usage_hours",
"alarm_code", "alarm_code",
"auto_clean", "auto_clean",
"auto_clean_progress",
"auto_clean_running",
"beep", "beep",
"climate", "climate",
"current_temperature_c", "current_temperature_c",
@@ -6,6 +6,8 @@
"air_filter_usage_hours", "air_filter_usage_hours",
"alarm_code", "alarm_code",
"auto_clean", "auto_clean",
"auto_clean_progress",
"auto_clean_running",
"beep", "beep",
"climate", "climate",
"current_temperature_c", "current_temperature_c",
@@ -6,6 +6,8 @@
"air_filter_usage_hours", "air_filter_usage_hours",
"alarm_code", "alarm_code",
"auto_clean", "auto_clean",
"auto_clean_progress",
"auto_clean_running",
"beep", "beep",
"climate", "climate",
"current_temperature_c", "current_temperature_c",
@@ -7,6 +7,8 @@
"air_filter_usage_hours", "air_filter_usage_hours",
"alarm_code", "alarm_code",
"auto_clean", "auto_clean",
"auto_clean_progress",
"auto_clean_running",
"beep", "beep",
"climate", "climate",
"current_temperature_c", "current_temperature_c",
@@ -7,6 +7,8 @@
"air_purify", "air_purify",
"alarm_code", "alarm_code",
"auto_clean", "auto_clean",
"auto_clean_progress",
"auto_clean_running",
"clean_level", "clean_level",
"climate", "climate",
"current_temperature_c", "current_temperature_c",
+2
View File
@@ -7,6 +7,8 @@
"air_purify", "air_purify",
"alarm_code", "alarm_code",
"auto_clean", "auto_clean",
"auto_clean_progress",
"auto_clean_running",
"beep", "beep",
"climate", "climate",
"current_limit_enabled", "current_limit_enabled",
@@ -5,6 +5,8 @@
"air_filter_usage_hours", "air_filter_usage_hours",
"alarm_code", "alarm_code",
"auto_clean", "auto_clean",
"auto_clean_progress",
"auto_clean_running",
"beep", "beep",
"climate", "climate",
"current_temperature_c", "current_temperature_c",
@@ -5,6 +5,8 @@
"air_filter_usage_hours", "air_filter_usage_hours",
"alarm_code", "alarm_code",
"auto_clean", "auto_clean",
"auto_clean_progress",
"auto_clean_running",
"beep", "beep",
"climate", "climate",
"current_temperature_c", "current_temperature_c",
@@ -7,6 +7,8 @@
"air_purify", "air_purify",
"alarm_code", "alarm_code",
"auto_clean", "auto_clean",
"auto_clean_progress",
"auto_clean_running",
"beep", "beep",
"climate", "climate",
"current_limit_enabled", "current_limit_enabled",
@@ -5,6 +5,8 @@
"air_filter_usage_hours", "air_filter_usage_hours",
"alarm_code", "alarm_code",
"auto_clean", "auto_clean",
"auto_clean_progress",
"auto_clean_running",
"beep", "beep",
"climate", "climate",
"current_temperature_c", "current_temperature_c",
+2
View File
@@ -6,6 +6,8 @@
"air_purify", "air_purify",
"alarm_code", "alarm_code",
"auto_clean", "auto_clean",
"auto_clean_progress",
"auto_clean_running",
"beep", "beep",
"clean_level", "clean_level",
"climate", "climate",
@@ -6,6 +6,8 @@
"air_filter_usage_hours", "air_filter_usage_hours",
"alarm_code", "alarm_code",
"auto_clean", "auto_clean",
"auto_clean_progress",
"auto_clean_running",
"beep", "beep",
"climate", "climate",
"current_temperature_c", "current_temperature_c",
+2
View File
@@ -5,6 +5,8 @@
"air_filter_usage_hours", "air_filter_usage_hours",
"alarm_code", "alarm_code",
"auto_clean", "auto_clean",
"auto_clean_progress",
"auto_clean_running",
"beep", "beep",
"climate", "climate",
"current_temperature_c", "current_temperature_c",
+2
View File
@@ -6,6 +6,8 @@
"air_filter_usage_hours", "air_filter_usage_hours",
"alarm_code", "alarm_code",
"auto_clean", "auto_clean",
"auto_clean_progress",
"auto_clean_running",
"energy_kwh", "energy_kwh",
"energy_saved_kwh", "energy_saved_kwh",
"firmware_update", "firmware_update",