mirror of
https://github.com/esphome/esphome.git
synced 2025-10-30 14:43:51 +00:00
Ensure components only powerdown after teardown (#9044)
This commit is contained in:
@@ -52,7 +52,7 @@ void PowerSupply::unrequest_high_power() {
|
||||
});
|
||||
}
|
||||
}
|
||||
void PowerSupply::on_shutdown() {
|
||||
void PowerSupply::on_powerdown() {
|
||||
this->active_requests_ = 0;
|
||||
this->pin_->digital_write(false);
|
||||
}
|
||||
|
||||
@@ -32,7 +32,7 @@ class PowerSupply : public Component {
|
||||
/// Hardware setup priority (+1).
|
||||
float get_setup_priority() const override;
|
||||
|
||||
void on_shutdown() override;
|
||||
void on_powerdown() override;
|
||||
|
||||
protected:
|
||||
GPIOPin *pin_;
|
||||
|
||||
Reference in New Issue
Block a user