Skip to content

Commit

Permalink
WC: Reset calibration flag when swapping outputs
Browse files Browse the repository at this point in the history
  • Loading branch information
rojer committed Sep 5, 2021
1 parent ec67046 commit 386d6b8
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/shelly_hap_window_covering.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,9 @@ Status WindowCovering::SetConfig(const std::string &config_json,
}
if (swap_outputs != -1 && swap_outputs != cfg_->swap_outputs) {
cfg_->swap_outputs = swap_outputs;
// As movement direction is now reversed, position is now incorrect too.
// Let's re-calibrate.
cfg_->calibrated = false;
*restart_required = true;
}
return Status::OK();
Expand Down

0 comments on commit 386d6b8

Please sign in to comment.