From aa666b4379406553bad506967ab5e7968ba3f77f Mon Sep 17 00:00:00 2001 From: Oliver Kleinecke Date: Wed, 19 Feb 2025 13:50:19 +0100 Subject: [PATCH] fix: reorder CombinedLamp struct members for better organization --- esphome/components/dynamic_lamp/dynamic_lamp.cpp | 5 +++-- esphome/components/dynamic_lamp/dynamic_lamp.h | 6 +++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/esphome/components/dynamic_lamp/dynamic_lamp.cpp b/esphome/components/dynamic_lamp/dynamic_lamp.cpp index 8b1d2d0b44..39cf3c6cb9 100644 --- a/esphome/components/dynamic_lamp/dynamic_lamp.cpp +++ b/esphome/components/dynamic_lamp/dynamic_lamp.cpp @@ -314,9 +314,10 @@ void DynamicLampComponent::read_timers_to_log() { lamp_names_str += this->active_lamps_[j].name; } } - ESP_LOGV(TAG, "Timer found for lamps [%s]: [ active: %d, action: %d, hour: %d, minute: %d, monday: %d, tuesday: %d, wednesday: %d, thursday: %d, friday: %d, saturday: %d, sunday: %d ]", - lamp_names_str.c_str(), timer.active, timer.action, timer.hour, timer.minute, timer.monday, timer.tuesday, + ESP_LOGV(TAG, "Timer found: [ active: %d, action: %d, hour: %d, minute: %d, monday: %d, tuesday: %d, wednesday: %d, thursday: %d, friday: %d, saturday: %d, sunday: %d ]", + timer.active, timer.action, timer.hour, timer.minute, timer.monday, timer.tuesday, timer.wednesday, timer.thursday, timer.friday, timer.saturday, timer.sunday); + ESP_LOGV(TAG, "Timer active for lamps %s", lamp_names_str.c_str()); } bool DynamicLampComponent::write_state_(uint8_t lamp_number, float state) { diff --git a/esphome/components/dynamic_lamp/dynamic_lamp.h b/esphome/components/dynamic_lamp/dynamic_lamp.h index ae8006f062..638399f93f 100644 --- a/esphome/components/dynamic_lamp/dynamic_lamp.h +++ b/esphome/components/dynamic_lamp/dynamic_lamp.h @@ -60,10 +60,10 @@ enum DynamicLampIdx : uint8_t { }; struct CombinedLamp { - bool active = false; - bool update_ = false; - std::string name = ""; uint8_t lamp_index; + bool active = false; + std::string name = ""; + bool update_ = false; float state_; bool used_outputs[16]; };