1
0
mirror of https://github.com/esphome/esphome.git synced 2025-04-01 00:18:18 +01:00

Update mcp4461_output.cpp

This commit is contained in:
Oliver Kleinecke 2025-02-05 14:53:04 +01:00 committed by GitHub
parent fa4028631b
commit b35fa32236
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -9,16 +9,6 @@ namespace mcp4461 {
static const char *const TAG = "mcp4461.output";
void Mcp4461Wiper::setup() {
if (this->initial_value_.has_value()) {
// Use the value
ESP_LOGCONFIG(TAG, "Setting initial value %.3f", %this->initial_value_);
this->_parent->set_wiper_level(wiper, this->initial_value_);
} else {
ESP_LOGCONFIG(TAG, "No initial value set, retaining previous wiper level.");
}
}
void Mcp4461Wiper::write_state(float state) {
uint8_t wiper_idx = static_cast<uint8_t>(this->wiper_);
ESP_LOGV(TAG, "Got value %02f from frontend", state);