From d9fcc21c12e3eb79633e56e861d43f6a0cfe73a3 Mon Sep 17 00:00:00 2001 From: Pedro Lamas Date: Mon, 12 Oct 2026 17:57:41 +0100 Subject: [PATCH] fix: hall filament width sensor toggle SET_FILAMENT_SENSOR only toggles runout detection, so also send ENABLE/DISABLE_FILAMENT_WIDTH_SENSOR to start and stop the sensor. Co-Authored-By: Claude Opus 5.5 Signed-off-by: Pedro Lamas --- .../widgets/runout-sensors/RunoutSensorsCard.vue | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/components/widgets/runout-sensors/RunoutSensorsCard.vue b/src/components/widgets/runout-sensors/RunoutSensorsCard.vue index 0e7be2c215..8466f782ff 100644 --- a/src/components/widgets/runout-sensors/RunoutSensorsCard.vue +++ b/src/components/widgets/runout-sensors/RunoutSensorsCard.vue @@ -70,7 +70,16 @@ export default class RunoutSensorsCard extends Mixins(StateMixin) { } changeSensor (item: RunoutSensor, value: boolean) { - this.sendGcode(`SET_FILAMENT_SENSOR SENSOR=${encodeGcodeParamValue(item.name)} ENABLE=${+value}`) + const gcodes = [ + `SET_FILAMENT_SENSOR SENSOR=${encodeGcodeParamValue(item.name)} ENABLE=${+value}` + ] + + if (item.name === 'hall_filament_width_sensor') { + // Older Klipper versions do not sync the runout state with the width sensor + gcodes.unshift(`${value ? 'ENABLE' : 'DISABLE'}_FILAMENT_WIDTH_SENSOR`) + } + + this.sendGcode(gcodes.join('\n')) } }