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