[fan] Do not save state for fan if configured as NO_RESTORE (#9472)
This commit is contained in:
1 parent
35b3f75f7c
commit
42b6939e90
1 file changed
+4
@@ -177,6 +177,10 @@ optional<FanRestoreState> Fan::restore_state_() {
|
||||
return {};
|
||||
}
|
||||
void Fan::save_state_() {
|
||||
if (this->restore_mode_ == FanRestoreMode::NO_RESTORE) {
|
||||
return;
|
||||
}
|
||||
|
||||
FanRestoreState state{};
|
||||
state.state = this->state;
|
||||
state.oscillating = this->oscillating;
|
||||
|
||||
Reference in new issue
Block a user