vacuum_station: bind VS9700 stick battery via /status/stick/vs/0 (#369)

* vacuum_station: bind VS9700 stick battery via /status/stick/vs/0

* vacuum_station: translate stick labels; drop diagnostic category

Address review: localize stick entity names in non-English files, and
keep wand status/BLE as primary entities rather than diagnostic.

---------

Co-authored-by: Nicolas <11050206+WiestDaessle@users.noreply.github.com>
This commit is contained in:
Nicolas
2026-08-14 14:44:52 -05:00
committed by GitHub
co-authored by Nicolas
parent 65fa80c71c
commit 3735d8b806
9 changed files with 115 additions and 18 deletions
@@ -1,9 +1,7 @@
"""Stick-vacuum clean/auto-empty station device registry (issue #131).
"""Stick-vacuum clean/auto-empty station device registry (issues #131 / #219).
See capabilities/vacuum_station.py's module docstring for why this only
covers the station's own dustbag/dustbin/UV-sanitize state and not any
vacuum-body control (suction, battery, cleaning mode) -- the diagnostics
dump this was built from reports none of that.
Station dustbag/dustbin/UV-sanitize state plus, when present (VS9700),
wand battery/charging via `/status/stick/vs/0`. No suction/room-map control.
"""
from ..capabilities import common, ignored, vacuum_station
@@ -20,6 +18,7 @@ REGISTRY = DeviceRegistry(
vacuum_station.DUSTBAG_USAGE,
vacuum_station.DUSTBIN_SETTING,
vacuum_station.CLEANSTATION_STATUS,
vacuum_station.STICK_BODY,
]
),
)
@@ -1,19 +1,14 @@
"""Capabilities for the Samsung stick-vacuum clean/auto-empty station
(model A-VSKR-TP1-22-VS9500AL, "Bespoke Jet" clean station, issue #131).
(models A-VSKR-TP1-22-VS9500AL / A-VSWW-TP1-23-VS9700, issues #131 / #219).
The reporter's diagnostics dump shows no vacuum-body state at all (no
suction level, no battery, no cleaning-mode/room-mapping control, no
docked/undocked status even) -- only the clean station's own dustbag,
dustbin auto-empty settings, and UV-C sanitizing-cycle status. This
strongly suggests the WiFi/DTLS module lives in the station, not the
handheld stick: the station is the only "device" this integration's local
API can see, and the wand's own controls are unrelated hardware not
reachable this way. Modeled as its own device type -- these hrefs don't
overlap with any existing family, so there's no shared-href ambiguity to
resolve against another type (see registry/by_type/__init__.py's
docstring for that rule).
The WiFi/DTLS module lives in the clean station. Older VS9500 dumps
(#131) exposed only dustbag/dustbin/UV-C station state. VS9700 dumps
(#219) additionally expose `/status/stick/vs/0` with the wand's battery
%, cleaning/charging status, and BLE link -- still no suction/room-map
control. Modeled as its own device type -- these hrefs don't overlap with
any existing family (see registry/by_type/__init__.py's docstring).
Resources verified against the issue #131 diagnostics dump.
Resources verified against issue #131 and #219 diagnostics dumps.
"""
from ..capability import Capability
@@ -156,3 +151,43 @@ CLEANSTATION_STATUS = Capability(
),
),
)
# Wand body state reported through the station (VS9700 / issue #219). Absent
# on the older VS9500 dump (#131) -- discovery drops entities when the href
# is missing.
STICK_BODY = Capability(
href="/status/stick/vs/0",
poll_tier="warm",
entities=(
SensorDesc(
key="battery",
field="x.com.samsung.da.stickbattery",
device_class="battery",
state_class="measurement",
unit="%",
value_fn=int_or_none,
),
BinarySensorDesc(
key="battery_charging",
field="x.com.samsung.da.stickcleaningstatus",
device_class="battery_charging",
value_fn=lambda v: v == "Charging",
),
SensorDesc(
key="stick_cleaning_status",
field="x.com.samsung.da.stickcleaningstatus",
icon="mdi:vacuum",
),
SensorDesc(
key="stick_operation_mode",
field="x.com.samsung.da.stickoperationmode",
icon="mdi:broom",
),
BinarySensorDesc(
key="stick_ble_connected",
field="x.com.samsung.da.stickbleconnection",
device_class="connectivity",
value_fn=lambda v: v == "On",
),
),
)
@@ -108,6 +108,9 @@
},
"softener_low": {
"name": "Málo aviváže"
},
"stick_ble_connected": {
"name": "Tyč připojena přes BLE"
}
},
"button": {
@@ -872,6 +875,12 @@
"stick_status": {
"name": "Stav tyče"
},
"stick_operation_mode": {
"name": "Provozní režim tyče"
},
"stick_cleaning_status": {
"name": "Stav čištění tyče"
},
"uvc_operation_time": {
"name": "Doba provozu UV-C"
},
@@ -108,6 +108,9 @@
},
"remote_control": {
"name": "Intelligente Steuerung"
},
"stick_ble_connected": {
"name": "Stick per BLE verbunden"
}
},
"button": {
@@ -872,6 +875,12 @@
"stick_status": {
"name": "Stick-Status"
},
"stick_operation_mode": {
"name": "Stick-Betriebsmodus"
},
"stick_cleaning_status": {
"name": "Stick-Reinigungsstatus"
},
"uvc_operation_time": {
"name": "UV-C Betriebszeit"
},
@@ -108,6 +108,9 @@
},
"softener_low": {
"name": "Softener low"
},
"stick_ble_connected": {
"name": "Stick BLE connected"
}
},
"button": {
@@ -872,6 +875,12 @@
"stick_status": {
"name": "Stick status"
},
"stick_operation_mode": {
"name": "Stick operation mode"
},
"stick_cleaning_status": {
"name": "Stick cleaning status"
},
"uvc_operation_time": {
"name": "UV-C operation time"
},
@@ -304,6 +304,9 @@
},
"auto_clean_running": {
"name": "Limpieza automática en curso"
},
"stick_ble_connected": {
"name": "Aspiradora conectada por BLE"
}
},
"button": {
@@ -1065,6 +1068,12 @@
"stick_status": {
"name": "Estado de la aspiradora"
},
"stick_operation_mode": {
"name": "Modo de funcionamiento de la aspiradora"
},
"stick_cleaning_status": {
"name": "Estado de limpieza de la aspiradora"
},
"uvc_operation_time": {
"name": "Tiempo de funcionamiento UV-C"
},
@@ -108,6 +108,9 @@
},
"softener_low": {
"name": "Aggiungi ammorbidente"
},
"stick_ble_connected": {
"name": "Scopa elettrica connessa via BLE"
}
},
"button": {
@@ -872,6 +875,12 @@
"stick_status": {
"name": "Stato scopa elettrica"
},
"stick_operation_mode": {
"name": "Modalità operativa scopa elettrica"
},
"stick_cleaning_status": {
"name": "Stato pulizia scopa elettrica"
},
"uvc_operation_time": {
"name": "Tempo funzionamento UV-C"
},
@@ -108,6 +108,9 @@
},
"softener_low": {
"name": "섬유유연제 부족"
},
"stick_ble_connected": {
"name": "스틱 BLE 연결됨"
}
},
"button": {
@@ -872,6 +875,12 @@
"stick_status": {
"name": "스틱 청소기 상태"
},
"stick_operation_mode": {
"name": "스틱 작동 모드"
},
"stick_cleaning_status": {
"name": "스틱 청소 상태"
},
"uvc_operation_time": {
"name": "UV-C 작동 시간"
},
@@ -108,6 +108,9 @@
},
"softener_low": {
"name": "Wasverzachter bijna op"
},
"stick_ble_connected": {
"name": "Steel via BLE verbonden"
}
},
"button": {
@@ -872,6 +875,12 @@
"stick_status": {
"name": "Status steel"
},
"stick_operation_mode": {
"name": "Bedieningsmodus steel"
},
"stick_cleaning_status": {
"name": "Schoonmaakstatus steel"
},
"uvc_operation_time": {
"name": "UV-C-bedrijfstijd"
},