mirror of
https://github.com/esphome/esphome.git
synced 2024-11-26 12:27:13 +01:00
fix servo bug restoring state and starting servo detached (#1008)
This commit is contained in:
parent
4620ad6124
commit
79248e8b74
@ -36,11 +36,11 @@ class Servo : public Component {
|
||||
this->rtc_ = global_preferences.make_preference<float>(global_servo_id);
|
||||
global_servo_id++;
|
||||
if (this->rtc_.load(&v)) {
|
||||
this->write(v);
|
||||
this->output_->set_level(v);
|
||||
return;
|
||||
}
|
||||
}
|
||||
this->write(0.0f);
|
||||
this->detach();
|
||||
}
|
||||
void dump_config() override;
|
||||
float get_setup_priority() const override { return setup_priority::DATA; }
|
||||
|
Loading…
Reference in New Issue
Block a user