1
0
mirror of https://github.com/esphome/esphome.git synced 2025-09-26 15:12:21 +01:00

fix: add timer data writing to FRAM in DynamicLampComponent

This commit is contained in:
Oliver Kleinecke
2025-02-18 13:07:57 +01:00
parent e497da0c34
commit 8e78f1b631

View File

@@ -250,9 +250,11 @@ bool DynamicLampComponent::add_timer(std::string lamp_name, bool timer_active, u
new_timer.begin_date = begin_date;
new_timer.end_date = end_date;
ESP_LOGV(TAG, "Added new timer for lamp %s, active %d, mode %d, hour %d, minute %d, monday %d, tuesday %d, wednesday %d, thursday %d, friday %d, saturday %d, sunday %d",
lamp_name, new_timer.active, new_timer.mode, new_timer.hour, new_timer.minute, new_timer.monday, new_timer.tuesday, new_timer.wednesday,
lamp_name.c_str(), new_timer.active, new_timer.mode, new_timer.hour, new_timer.minute, new_timer.monday, new_timer.tuesday, new_timer.wednesday,
new_timer.thursday, new_timer.friday, new_timer.saturday, new_timer.sunday);
ESP_LOGV(TAG, "Size of struct is %" PRIu8 "", static_cast<uint8_t>(sizeof(new_timer)));
this->fram_->write(2048, lamp_name_cstr, 32);
this->fram_->writeObject((2048 + 32), new_timer);
return true;
}