From 3f93c13a4b0c2a74e1f0cf459f2db27b945ceb07 Mon Sep 17 00:00:00 2001 From: Oliver Kleinecke Date: Fri, 7 Feb 2025 17:35:52 +0100 Subject: [PATCH] Update mcp4461.cpp --- esphome/components/mcp4461/mcp4461.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/esphome/components/mcp4461/mcp4461.cpp b/esphome/components/mcp4461/mcp4461.cpp index 829865e315..b5ce591547 100644 --- a/esphome/components/mcp4461/mcp4461.cpp +++ b/esphome/components/mcp4461/mcp4461.cpp @@ -44,9 +44,9 @@ void Mcp4461Component::begin_() { } void Mcp4461Component::set_initial_value(Mcp4461WiperIdx wiper, float initial_value) { - uint8_t wiper_id = static_cast(wiper); - this->reg_[wiper_id].initial_value = initial_value; - } + uint8_t wiper_id = static_cast(wiper); + this->reg_[wiper_id].initial_value = initial_value; +} void Mcp4461Component::set_write_protection_status_() { uint8_t status_register_value;