mirror of
https://github.com/esphome/esphome.git
synced 2024-11-22 23:18:10 +01:00
Fix cover set position by force pushing position_id datapoint (simila… (#3435)
This commit is contained in:
parent
5fac67ce15
commit
7cba0c6fb0
1 changed files with 2 additions and 2 deletions
|
@ -66,7 +66,7 @@ void TuyaCover::control(const cover::CoverCall &call) {
|
||||||
auto position_int = static_cast<uint32_t>(pos * this->value_range_);
|
auto position_int = static_cast<uint32_t>(pos * this->value_range_);
|
||||||
position_int = position_int + this->min_value_;
|
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()) {
|
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_);
|
auto position_int = static_cast<uint32_t>(pos * this->value_range_);
|
||||||
position_int = position_int + this->min_value_;
|
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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue