Adaptive Lighting: Permit entering sunrise/sunset time as a template value

As an example, the following would output 00:07:00 (or whatever your next alarm time is set to):

{{ as_timestamp(states.sensor.vog_l04_next_alarm.state)|timestamp_custom ('%H:%M:%S')  }}

You cant change the time of sunrise/sunset. That depends only on where you are and the time of year.

I’d imagine the best / only place to put a feature request for a custom component is on it’s GitHub repo.

I agree with Tom also regarding sunrise/set. If you wanted to alter the time at which the integration considers sunrise/set, that should be called something else completely, not a modification of a natural time. Having an offset to sunrise/set is fine, but a definite time to be used in place of sunrise/set should have another name altogether (or maybe just sunrise_override, sunset_override so its clear that the natural sunrise/set is no longer being used).

*Disclosure: I don’t yet have this integration installed… it’s on the to-do list. I was kinda waiting for it to be included as a core HA feature.

The integration allows you to hardcode your own sunrise/sunset time as HH:MM:SS.
image
Why not allow the user to specify that in a template??

HA Core Feature Requests says to post here…

I didn’t think this was in core yet…??

It’s got both feet inside the door! @basnijholt 's fork doesn’t have a place for issues or requests. https://github.com/home-assistant/core/pull/40626 does but it’s core and core directs me here. Comments on the PR are closed…

My apologies.

No worries!

I presume @basnijholt will be the maintainer for the about-to-be-core integration so hopefully he shows up!

@dbrunt Thank you for posting this. I asked whether this was possible because of a tension between two of my goals for my lighting system:

  • Adjust the color temperature of my lights to promote a circadian rhythm that matches my schedule, and
  • Gradually turn on my lights before my alarm goes off in the morning.

I understand that these are both common goals. Each is easy to achieve on its own, but fitting them together is difficult. I could disable Adaptive Lighting when my wake-up routine begins to run, but that would create a couple of problems:

  • I would have to re-implement the Adaptive Lighting color temp calculation or a cruder linear formula. Neither solution is very satisfying, especially as I would have to manually adjust the wake-up script to maintain consistency with any changes I made to my Adaptive Lighting settings.
  • I would need to script a way of transitioning control between my wake-up automation and Adaptive Lighting to gracefully (i.e. without suddenly changing the color temp) handle my waking up and turning my lights on or off. Depending on how late or early I plan on waking up, and the degree of color temp change I can tolerate, this could amount to re-implementing most of Adaptive Lighting.

The better solution by far is to make it possible to set the sunrise time programmatically. One way to do this is to allow templates. Another is to move the sunrise_time value, like certain other values, into an entity so scripts can change it.

I think the correct place for this feature request is on the GitHub repo https://github.com/basnijholt/adaptive-lighting/issues

However, due to my PR not getting any reviews yet, I’ve decided to not add anymore features and just focus on bugs and getting the integration ready for merging.

If we collect the feature requests there, I will not forget about it when I have the time later :wink:

1 Like

Done. Thank you for the suggestion.

Old thread I know, but I recently forked over the repo and solved this problem myself.
th3w1zard1/adaptive-lighting: Adaptive Lighting custom component for Home Assistant (github.com)

Provides service call ‘adaptive_lighting.change_sunrise_settings’ which allows a user to set the sunrise/sunset time with a simple service call.

I synced up an automation to my Google calendar and fire that service call everytime I wake up. Should be what you’re looking for.