From 59ecddfe2a3aa2866daa2efbd6b023c306ff3b2f Mon Sep 17 00:00:00 2001 From: Oliver Kleinecke Date: Sun, 9 Feb 2025 18:53:47 +0100 Subject: [PATCH] Update mcp4461_output.cpp --- esphome/components/mcp4461/output/mcp4461_output.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/esphome/components/mcp4461/output/mcp4461_output.cpp b/esphome/components/mcp4461/output/mcp4461_output.cpp index 880019c6e0..8362b4bb59 100644 --- a/esphome/components/mcp4461/output/mcp4461_output.cpp +++ b/esphome/components/mcp4461/output/mcp4461_output.cpp @@ -31,14 +31,16 @@ void Mcp4461Wiper::disable_wiper() { } void Mcp4461Wiper::increase_wiper() { + if (this->state_ == 0.256) { return; } if (this->parent_->increase_wiper_(this->wiper_)) { - this->state_ = this->state_ + 1.0; + this->state_ = this->state_ + 0.001; } } void Mcp4461Wiper::decrease_wiper() { + if (this->state_ == 0.000) { return; } if (this->parent_->decrease_wiper_(this->wiper_)) { - this->state_ = this->state_ - 1.0; + this->state_ = this->state_ - 0.001; } }