17 #ifndef _LIGHT_SCHEDULER_H_
18 #define _LIGHT_SCHEDULER_H_
32 uint64_t light_duration_;
48 Relay *
light,
int start_hour,
int start_min, uint64_t duration_sec);
55 void reset(tm * time);
63 void run(tm * time,
bool is_bright);
Schedules light switching depending on time of day and ambient light.
void reset(tm *time)
reset start time to given time
void run(tm *time, bool is_bright)
Run this in a loop and pass the current time and a boolean indicating if its bright.
LightScheduler(Relay *light, int start_hour, int start_min, uint64_t duration_sec)
Construct a new Light Scheduler object.