mirror of
https://github.com/esphome/esphome.git
synced 2025-03-31 16:08:15 +01:00
Update mcp4461_output.cpp
This commit is contained in:
parent
3269b931a0
commit
095d721666
@ -38,11 +38,11 @@ void Mcp4461Wiper::set_initial_value(float initial_value) {
|
||||
float state = initial_value * 1000;
|
||||
this->initial_value_ = static_cast<uint16_t>(state);
|
||||
// Use the value
|
||||
ESP_LOGCONFIG(TAG, "Setting initial value %" PRIu16 "", *this->initial_value_);
|
||||
ESP_LOGV(TAG, "Setting initial value %" PRIu16 "", *this->initial_value_);
|
||||
this->state_ = state;
|
||||
this->parent_->set_wiper_level(this->wiper_, *this->initial_value_);
|
||||
} else {
|
||||
ESP_LOGCONFIG(TAG, "Invalid initial value set, retaining previous wiper level.");
|
||||
ESP_LOGV(TAG, "Invalid initial value set, retaining previous wiper level.");
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user