mirror of
https://github.com/esphome/esphome.git
synced 2025-03-14 06:38:17 +00:00
fix: update save mode cases to use SupportedSaveModes enum for consistency
This commit is contained in:
parent
b67a42671f
commit
253d3e1fea
@ -366,18 +366,18 @@ void DynamicLampComponent::restore_lamp_settings_() {
|
||||
|
||||
void DynamicLampComponent::restore_timers_() {
|
||||
switch (this->save_mode_) {
|
||||
case SAVE_MODE_NONE:
|
||||
case SupportedSaveModes::SAVE_MODE_NONE:
|
||||
for (uint8_t i = 0; i < 256; i++) {
|
||||
this->timers_[i] = DynamicLampTimer();
|
||||
this->timers_[i].in_use = false;
|
||||
}
|
||||
break;
|
||||
case SAVE_MODE_LOCAL:
|
||||
case SupportedSaveModes::SAVE_MODE_LOCAL:
|
||||
// ToDo - yet to be implemented
|
||||
ESP_LOGW(TAG, "Save mode LOCAL not implemented yet, sorry");
|
||||
this->status_set_warning();
|
||||
break;
|
||||
case SAVE_MODE_FRAM:
|
||||
case SupportedSaveModes::SAVE_MODE_FRAM:
|
||||
DynamicLampTimer timer = DynamicLampTimer();
|
||||
std::string lamp_names_str;
|
||||
for (uint8_t i = 0; i < 256; i++) {
|
||||
@ -406,10 +406,6 @@ void DynamicLampComponent::restore_timers_() {
|
||||
}
|
||||
}
|
||||
break;
|
||||
default:
|
||||
ESP_LOGW(TAG, "Currently only NONE(0), LOCAL(1) & FRAM(2) save modes supported, ignoring value %" PRIu8 " and defaulting to NONE!", this->save_mode_);
|
||||
this->save_mode_ = 0;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user