From: David Woodhouse Date: Wed, 12 Feb 2025 14:47:40 +0000 (+0000) Subject: Only reset home on stall if travelling upwards X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=451312d12c4f5976c2621c1064df27802ccf4130;p=users%2Fdwmw2%2Fesp32-pool.git Only reset home on stall if travelling upwards --- 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