mirror of
https://github.com/esphome/esphome.git
synced 2024-12-22 05:24:53 +01:00
fix servo bug restoring state and starting servo detached (#1008)
This commit is contained in:
parent
4620ad6124
commit
79248e8b74
1 changed files with 2 additions and 2 deletions
|
@ -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 a new issue