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

feat: move DynamicLampTimer struct definition to header file for better accessibility

This commit is contained in:
Oliver Kleinecke
2025-02-18 10:39:02 +01:00
parent cb92ed2449
commit 2c090678c8
2 changed files with 18 additions and 18 deletions

View File

@@ -17,24 +17,6 @@ namespace dynamic_lamp {
static const char *TAG = "dynamic_lamp";
struct DynamicLampTimer {
char lamp_name[32] : 256;
uint8_t mode : 1;
uint8_t hour : 5;
uint8_t minute : 6;
bool active : 1;
bool monday : 1;
bool tuesday : 1;
bool wednesday : 1;
bool thursday : 1;
bool friday : 1;
bool saturday : 1;
bool sunday : 1;
unsigned char :0;
ESPTime begin_date : 64;
ESPTime end_date : 64;
};
void DynamicLampComponent::setup() {
this->begin();
}

View File

@@ -67,6 +67,24 @@ struct CombinedLamp {
bool used_outputs[16];
};
struct DynamicLampTimer {
char lamp_name[32] : 256;
uint8_t mode : 1;
uint8_t hour : 5;
uint8_t minute : 6;
bool active : 1;
bool monday : 1;
bool tuesday : 1;
bool wednesday : 1;
bool thursday : 1;
bool friday : 1;
bool saturday : 1;
bool sunday : 1;
unsigned char :0;
ESPTime begin_date : 64;
ESPTime end_date : 64;
};
class DynamicLamp;
class DynamicLampComponent : public Component {