Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request, beforeSunrise and afterSunset to support offset param #74

Open
LukeDefeo opened this issue Apr 27, 2020 · 2 comments
Open

Comments

@LukeDefeo
Copy link

So I have setup kelvin and so far I am quite happy with how it works except for one thing. It seems that if you want to override the points in the colour temperature/brightness curve throughout the day you have to put absolute times of the day in the config. e.g

  "afterSunset": [
        {
          "time": "20:00",
          "colorTemperature": 2800,
          "brightness": 52
        },
        {
          "time": "22:00",
          "colorTemperature": 2000,
          "brightness": 24
        }

While this works its not relative to the sunset, it's an absolute time, when we roll into winter months and sunset is much earlier i will have to adjust all of these every month or so. What i would think would be a great improvement would be something like this

"afterSunset": [
        {
          "offset": {
               "hours" : 1,
               "minutes" : 30
          },
          "colorTemperature": 2800,
          "brightness": 52
        },
        {
          "offset": {
            "hours" : 3,
            "minutes" : 0
           },
          "colorTemperature": 2000,
          "brightness": 24
        }

Offset can we used instead of time, (time is still kept for backwards compat). All of my adjustments to the curve are relative to the sun position which the app can keep track of via the timezone flag that is passed in.

Couple of other points for discussion:

  • Passing in time and offset together would be a validation error?
  • offset can be negative, so. you can pull in the temperature 1 hour before sunrise/ sunset
  • offset in the after sunset block is the offset from sunset
  • offset in the beforeSunRise block is the offset from sun rise
  • Any values that come via after sunset / before sunrise overwrite the default (daytime values)

What do you think?

@smahwrbgat
Copy link

Just hopping in to say I've been hoping for something along these lines for years. I'm not sure about the formatting of the offset (it may be that 1:30 suffices vs. having hours and minutes as separate lines, or just having in minutes and using 90), but I'd love to have this kind of feature, as it allows for a lot more flexibility and fine-tuning in setup, especially if negative values are allowed.

@adzenith
Copy link

Looks like this has been implemented in a fork:
https://github.com/RaphaelMarinier/kelvin/tree/new_schedule2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants