mirror of
				https://github.com/esphome/esphome.git
				synced 2025-10-31 15:12:06 +00:00 
			
		
		
		
	fix: update wiper state management to use update_state method for accuracy
This commit is contained in:
		| @@ -37,13 +37,15 @@ void Mcp4461Wiper::turn_off() { this->parent_->disable_wiper_(this->wiper_); } | ||||
|  | ||||
| void Mcp4461Wiper::increase_wiper() { | ||||
|   if (this->parent_->increase_wiper_(this->wiper_)) { | ||||
|     this->state_ = this->state_ + 0.001; | ||||
|     this->state_ = this->update_state(); | ||||
|     ESP_LOGV(TAG, "Increased wiper %d to %" PRIu16 "", this->wiper_, static_cast<uint16_t>(this->state_ * 256)); | ||||
|   } | ||||
| } | ||||
|  | ||||
| void Mcp4461Wiper::decrease_wiper() { | ||||
|   if (this->parent_->decrease_wiper_(this->wiper_)) { | ||||
|     this->state_ = this->state_ - 0.001; | ||||
|     this->state_ = this->update_state(); | ||||
|     ESP_LOGV(TAG, "Decreased wiper %d to %" PRIu16 "", this->wiper_, static_cast<uint16_t>(this->state_ * 256)); | ||||
|   } | ||||
| } | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user