1
0
mirror of https://github.com/esphome/esphome.git synced 2025-04-16 07:40:29 +01:00

feat: add clear_fram method to DynamicLampComponent for FRAM clearing functionality

This commit is contained in:
Oliver Kleinecke 2025-02-19 19:43:35 +01:00
parent 8ae0877024
commit 6dba6fc56e
2 changed files with 6 additions and 1 deletions

View File

@ -410,6 +410,10 @@ void DynamicLampComponent::restore_timers_() {
}
}
void DynamicLampComponent::clear_fram_() {
this->fram_->clear();
}
std::vector<uint8_t> DynamicLampComponent::split_to_int_vector_(std::string lamp_list_str) {
std::vector<uint8_t> tokens;
std::stringstream sstream(lamp_list_str);

View File

@ -123,7 +123,8 @@ class DynamicLampComponent : public Component {
std::array<bool, 16> get_lamp_outputs_by_name_(std::string lamp_name);
std::vector<uint8_t> split_to_int_vector_(std::string lamp_list_str);
std::vector<bool> build_lamp_list_from_list_str_(std::string lamp_list_str);
void clear_fram_();
CombinedLamp active_lamps_[16];
LinkedOutput available_outputs_[16];
DynamicLampTimer timers_[12];