1
0
mirror of https://github.com/esphome/esphome.git synced 2025-03-15 07:08:20 +00:00

fix: initialize DynamicLampTimer instance for proper object creation in restore_timers_

This commit is contained in:
Oliver Kleinecke 2025-02-19 16:53:06 +01:00
parent c025ccabaa
commit b67a42671f

View File

@ -378,7 +378,7 @@ void DynamicLampComponent::restore_timers_() {
this->status_set_warning(); this->status_set_warning();
break; break;
case SAVE_MODE_FRAM: case SAVE_MODE_FRAM:
DynamicLampTimer timer; DynamicLampTimer timer = DynamicLampTimer();
std::string lamp_names_str; std::string lamp_names_str;
for (uint8_t i = 0; i < 256; i++) { for (uint8_t i = 0; i < 256; i++) {
this->fram_->read((0x4000 + (i * 64)), reinterpret_cast<unsigned char *>(&timer), 64); this->fram_->read((0x4000 + (i * 64)), reinterpret_cast<unsigned char *>(&timer), 64);