mirror of
https://github.com/esphome/esphome.git
synced 2025-09-08 06:12:20 +01:00
Update mcp4461_output.h
This commit is contained in:
@@ -30,6 +30,12 @@ class Mcp4461Wiper : public output::FloatOutput {
|
|||||||
parent->disable_terminal(wiper, 'b');
|
parent->disable_terminal(wiper, 'b');
|
||||||
if (!terminal_w && wiper_idx < 4)
|
if (!terminal_w && wiper_idx < 4)
|
||||||
parent->disable_terminal(wiper, 'w');
|
parent->disable_terminal(wiper, 'w');
|
||||||
|
if (this->initial_value_.has_value()) {
|
||||||
|
// Use the value
|
||||||
|
parent->set_wiper_level(wiper, this->initial_value_);
|
||||||
|
} else {
|
||||||
|
ESP_LOGCONFIG(TAG, "No initial value set, retaining previous wiper level.");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
uint16_t get_wiper_level();
|
uint16_t get_wiper_level();
|
||||||
void save_level();
|
void save_level();
|
||||||
|
Reference in New Issue
Block a user