1
0
mirror of https://github.com/esphome/esphome.git synced 2025-03-24 11:38:23 +00:00

Update mcp4461_output.cpp

This commit is contained in:
Oliver Kleinecke 2025-02-09 18:51:49 +01:00 committed by GitHub
parent d6c3dbe175
commit 0b1a5fdeb8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -15,7 +15,7 @@ void Mcp4461Wiper::write_state(float state) {
}
}
uint16_t Mcp4461Wiper::read_state() { return this->parent_->get_wiper_level_(this->wiper_); }
float Mcp4461Wiper::read_state() { return (static_cast<float>(this->parent_->get_wiper_level_(this->wiper_)) / 1000.0); }
uint16_t Mcp4461Wiper::update_state() {
this->state_ = this->read_state();