From adf81b95071972391b84d4c505e51309314c9018 Mon Sep 17 00:00:00 2001 From: Oliver Kleinecke Date: Fri, 7 Feb 2025 17:21:00 +0100 Subject: [PATCH] Update mcp4461.cpp --- esphome/components/mcp4461/mcp4461.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/esphome/components/mcp4461/mcp4461.cpp b/esphome/components/mcp4461/mcp4461.cpp index b8736e5c64..db7df5cbfa 100644 --- a/esphome/components/mcp4461/mcp4461.cpp +++ b/esphome/components/mcp4461/mcp4461.cpp @@ -43,6 +43,11 @@ void Mcp4461Component::begin_() { } } +void Mcp4461Wiper::set_initial_value(Mcp4461WiperIdx wiper, float 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; status_register_value = this->get_status_register();