Fix cover set position by force pushing position_id datapoint (simila… (#3435)

This commit is contained in:
Dennis 2022-05-10 11:42:31 +02:00 committed by GitHub
parent 5fac67ce15
commit 7cba0c6fb0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -66,7 +66,7 @@ void TuyaCover::control(const cover::CoverCall &call) {
auto position_int = static_cast<uint32_t>(pos * this->value_range_);
position_int = position_int + this->min_value_;
parent_->set_integer_datapoint_value(*this->position_id_, position_int);
parent_->force_set_integer_datapoint_value(*this->position_id_, position_int);
}
}
if (call.get_position().has_value()) {
@ -82,7 +82,7 @@ void TuyaCover::control(const cover::CoverCall &call) {
auto position_int = static_cast<uint32_t>(pos * this->value_range_);
position_int = position_int + this->min_value_;
parent_->set_integer_datapoint_value(*this->position_id_, position_int);
parent_->force_set_integer_datapoint_value(*this->position_id_, position_int);
}
}