From 451312d12c4f5976c2621c1064df27802ccf4130 Mon Sep 17 00:00:00 2001 From: David Woodhouse Date: Wed, 12 Feb 2025 14:47:40 +0000 Subject: [PATCH] Only reset home on stall if travelling upwards --- blind.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/blind.yaml b/blind.yaml index a2edcba..bdb16f7 100644 --- a/blind.yaml +++ b/blind.yaml @@ -172,7 +172,9 @@ stepper: args: [ "id(encoder)->get_state()", "id(motor)->current_direction", "cover_operation_to_str(id(pd_blinds)->current_operation)" ] - stepper.stop: motor #un-comment this to disable on stall - - lambda: id(sensored_home_pos) = id(encoder)->get_state(); #un-comment this to not reset home on stall + - lambda: | + if (id(motor).current_direction < 0) + id(sensored_home_pos) = id(encoder)->get_state(); - cover.template.publish: id: pd_blinds state: OPEN -- 2.50.1