Comment

Comment by h4n1

I recently added a similar feature to the absolutely terrible code I've hacked together for controlling my smart lights[0]. I used python's astral package to get the highest and lowest sun elevations for the day, then define the lights' warmth at both, and at elevation == 0. Every 15 min a cron job sets the lights' warmth accordingly.

This is for a room with very little natural light, where the lights are on most of the day. Having them respond to the position of the sun lets me still feel the rhythm of the day outside.

[0]: https://git.sr.ht/~h4n1/z2m-scripts

parent h4n1 4 years ago

No comments yet

Be the first to share your thoughts.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton