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

fix: update DynamicLampTimer struct to use lamp_name correctly in add_timer method

This commit is contained in:
Oliver Kleinecke
2025-02-18 14:29:26 +01:00
parent 1a76c1b624
commit 5bffcee7b7
2 changed files with 2 additions and 2 deletions

View File

@@ -234,7 +234,7 @@ bool DynamicLampComponent::add_timer(std::string lamp_name, bool timer_active, u
char lamp_name_buffer[32];
strncpy(lamp_name_buffer, lamp_name.c_str(), 32);
DynamicLampTimer new_timer;
new_timer.name = lamp_name_buffer;
new_timer.lamp_name = lamp_name_buffer;
new_timer.active = timer_active;
new_timer.mode = mode;
new_timer.hour = hour;

View File

@@ -69,7 +69,7 @@ struct CombinedLamp {
};
struct DynamicLampTimer {
unsigned char lamp_name[32]: 256;
unsigned char lamp_name[32];
uint8_t mode : 1;
uint8_t hour : 5;
uint8_t minute : 6;