From 4dd4a9872e90a54d79460d2aa153b81f00bc8cb4 Mon Sep 17 00:00:00 2001 From: cjkas Date: Mon, 12 Oct 2026 20:58:10 +0200 Subject: [PATCH] fix: ignore a received StepUp for a shade with no up time The lift StepUp checked downTime for 0 but divided by upTime, so a shade with an up time of 0 had its target sent to 0% instead of the step being ignored. Co-Authored-By: Claude Opus 5.5 --- src/Somfy.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Somfy.cpp b/src/Somfy.cpp index ce5b00d..8403aac 100644 --- a/src/Somfy.cpp +++ b/src/Somfy.cpp @@ -2019,7 +2019,7 @@ void SomfyShade::processFrame(somfy_frame_t &frame, bool internal) { this->p_tiltTarget(max(0.0f, this->currentTiltPos - (100.0f/(static_cast(this->tiltTime/static_cast(this->stepSize * this->lastFrame.stepSize)))))); } else if(this->currentPos > 0.0f) { - if(this->downTime == 0 || this->stepSize == 0) return; + if(this->upTime == 0 || this->stepSize == 0) return; this->p_target(max(0.0f, this->currentPos - (100.0f/(static_cast(this->upTime/static_cast(this->stepSize * this->lastFrame.stepSize)))))); } this->emitCommand(cmd, internal ? "internal" : "remote", frame.remoteAddress);