From b56ff4dfa352cd826c000e3f0c399b188f1ac3dc Mon Sep 17 00:00:00 2001 From: stefanbode Date: Thu, 25 Nov 2021 08:31:40 +0100 Subject: [PATCH] Allow tilt change with wall buttons If venetian shutter is stopped before start moving the actual tilt is stored as new target tilt for further operations. --- tasmota/xdrv_27_shutter.ino | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tasmota/xdrv_27_shutter.ino b/tasmota/xdrv_27_shutter.ino index 23940ce79..ea98aa625 100644 --- a/tasmota/xdrv_27_shutter.ino +++ b/tasmota/xdrv_27_shutter.ino @@ -479,6 +479,10 @@ void ShutterPowerOff(uint8_t i) if (Shutter[i].direction !=0) { Shutter[i].direction = 0; } + if (Shutter[i].real_position == Shutter[i].start_position) { + //AddLog(LOG_LEVEL_DEBUG, PSTR("SHT: Update target tilt shutter %d from %d to %d"), i+1, Shutter[i].tilt_target_pos , Shutter[i].tilt_real_pos); + Shutter[i].tilt_target_pos = Shutter[i].tilt_real_pos; + } TasmotaGlobal.rules_flag.shutter_moved = 1; switch (Shutter[i].switch_mode) { case SHT_SWITCH: