From 4a339f61064af0d748f2bd003f19da53e5557861 Mon Sep 17 00:00:00 2001 From: Oliver Kleinecke Date: Sun, 9 Feb 2025 17:27:22 +0100 Subject: [PATCH] Update mcp4461_output.cpp --- esphome/components/mcp4461/output/mcp4461_output.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/esphome/components/mcp4461/output/mcp4461_output.cpp b/esphome/components/mcp4461/output/mcp4461_output.cpp index 55c278d86a..5475794c6e 100644 --- a/esphome/components/mcp4461/output/mcp4461_output.cpp +++ b/esphome/components/mcp4461/output/mcp4461_output.cpp @@ -39,7 +39,10 @@ void Mcp4461Wiper::write_state(float state) { uint16_t Mcp4461Wiper::read_state() { return this->parent_->get_wiper_level_(this->wiper_); } -void Mcp4461Wiper::update_state() { this->state = this->read_state(this->wiper_); } +uint16_t Mcp4461Wiper::update_state() { + this->state = this->read_state(this->wiper_); + return this->state +} void Mcp4461Wiper::save_level() { if (this->parent_->is_failed()) {