1
0
mirror of https://github.com/esphome/esphome.git synced 2025-09-19 19:52:20 +01:00

Update mcp4461.cpp

This commit is contained in:
Oliver Kleinecke
2025-02-07 17:00:04 +01:00
committed by GitHub
parent b888a7336e
commit 34dac471c4

View File

@@ -27,7 +27,7 @@ void Mcp4461Component::begin_() {
for (uint8_t i = 0; i < 8; i++) {
if (this->reg_[i].initial_value.has_value()) {
uint16_t initial_state;
initial_state = static_cast<uint16_t>(this->reg_[i].initial_value * 1000.0);
initial_state = static_cast<uint16_t>(this->reg_[i].initial_value * 1000.f);
this->write_wiper_level_(i, initial_state);
}
if (this->reg_[i].enabled) {