Calm – daylight-aware, circadian lighting (beta)
Most of us light a room with a motion sensor that has daylight as a condition.
Calm turns that around: it is a light switch that watches the daylight, with motion as a condition.
A word about me, and about this project
I love thinking up smart, easy-to-use solutions for the home, but I can’t write code.
Calm was built 100% by AI (Claude, by Anthropic): I came up with the idea, described what I wanted, and tested every step in my own house. I didn’t add a single comma to the code, and I’m not ashamed of that.
I’m sharing it for two reasons:
- I think it can make other people happy. It made my home noticeably nicer to live in, and it would be a shame to keep that to myself.
- I want people to look at the code. Because no human wrote it, I’d really value experienced eyes on it: testers in other homes with other sensors, and developers willing to read through it and tell me what’s wrong or could be better.
What it does
-
Fills in what the daylight leaves
A light sensor tells Calm how much daylight there is. Below the line you set, the lamps help out; above it, they go off. Calm learns how much of its own light the sensor sees, so the lamps never react to themselves. -
Follows the day
Colour first, brightness after, based on melanopic EDI (CIE S 026 / Brown et al. 2022). Separate brightness for day and evening. -
Stays unnoticed
Changes are slower than the eye notices. Clouds get a wait, so they don’t flick the lamps. A restart is invisible.
Walking into a dark room is the exception: the light is there at once. -
Knows when not to
Motion, standby, nightlight, overrides (work light, film, …) and conditions such as somebody home and night mode off. When something else touches the lamps, Calm steps aside.
Rooms come straight from your Home Assistant areas and follow them. Everything is set up in the UI, and there is an optional dashboard card to set the line against the live daylight.
Status: beta, and how you can help
Running daily in my house with Philips Hue lamps and motion sensors.
- Testers: especially with other brands of light sensors or different room layouts.
- Code reviewers: read through it, open an issue or a pull request. Every remark is welcome.
Install
- HACS → ⋮ → Custom repositories
- Add
https://github.com/playlist440/calmas Integration - Turn on Show beta versions and install Calm
- Restart Home Assistant, then Settings → Devices & services → Add integration → Calm
Something looks wrong?
Please open an issue and attach the room’s day file from config/calm/<room>/.
Every decision Calm makes is in there, with the reason.
Most likely, issues will also be solved with Claude.
Inspired by Adaptive Lighting (basnijholt/adaptive-lighting), but no shared code.
