benleb / ad-automoli

💡 Fully automatic light management based on conditions like motion, illuminance, humidity, and other clever features
https://github.com/benleb/ad-automoli
MIT License
110 stars 29 forks source link

Distinguish between weekdays and weekends #83

Open clipse2004 opened 2 years ago

clipse2004 commented 2 years ago

Hi,

tell me is it somehow possible to define the schedules a little more precisely? I would like that my light is switched a little differently on the weekend. So in a different brightness level at a different time, is that somehow possible?

Thx!

benleb commented 2 years ago

Ah interesting idea...! Nope that is something new :D I will think about that and how it may be implemented 👍 Thanks!

Ramblurr commented 2 years ago

I have a similar request: even more fine-grained control of the weekday.

In our household, one of us is a teacher and has to be at school at different times. On some days they have to be at school before the first lesson, which means waking up quite early. On these days we want the lights that are normally set to "sunrise" to actually be much earlier.

Here's my off-the-cuff idea about how to implement it:

Perhaps add an optional weekday field to the daytimes object?

  daytimes:
    - { name: morning, starttime: sunrise, light: scene.bathroom_bright }
    - { name: morning, starttime: "05:00", light: scene.bathroom_bright, weekdays: [monday, thursday] }

The idea being if the "name" is the same across entries, then the "most specific" wins. If an entry is ambiguous (a tie), then the first entry in the daytimes list wins.