Let presence trigger an AI-chosen light level

A Home Assistant sensor starts an n8n flow, and an agent decides how bright the light should be for that time of day.

Done with n8n· Intermediate

What they did
They ran n8n inside Home Assistant. When the presence sensor switched from Clear to Detected, Home Assistant launched a webhook call into n8n, where a Deepseek agent was set up as a lighting designer. That agent selected a brightness percentage for the current time, and the last step sent that value back to Home Assistant’s turn_on service for the light.
How it went
The workflow is described as working and is intended to make nights less glaring and mornings less bright. It only sets brightness, and the source did not include any measured outcome.
Tips
The webhook needs the Home Assistant IP address, not the default hostname, to connect properly. The write-up also recommends at least 4GB of RAM.

Try it yourself with n8n

Set up an n8n workflow for Home Assistant. If [presence sensor] changes from Clear to Detected in [room], ask an AI step to choose a brightness level for [light entity] based on the current time of day and [your rules]. Before any action that would be hard to undo, such as sending, deleting, submitting, or paying, stop and ask me to approve it. Then use the approved brightness to turn on the light.

Fill in the [brackets]. Agents can make mistakes, so review anything before it is sent, paid or deleted.

Get 3 agent uses like this every morning

With the day's top AI news. Free, and one click to unsubscribe.