Restarting Home Assistant

Restarting My Home Assistant Node

I’ve decided to treat this as a fresh start. My old Home Assistant setup worked, but it was piecemeal, weirdly built, and had several integrations bolted on over time with half-documented, harder to automate processes. This time, I’m rebuilding with a clean architecture, beginning with the essentials: lighting and door/presence sensors.

One of the first automations I set up in my rebuilt Home Assistant node was a simple but very satisfying one: turning on the entry light when I come home, but only if it’s dark.

Why this matters: it’s the first step away from “smart switches” that blindly follow one input, and toward context-aware automations. The system doesn’t just react; it makes decisions based on environment.

The Solution

Tie together two signals:

  1. Door opens → means I’m arriving.
  2. Luminosity below threshold → means it’s dark enough to need lighting.

Only when both are true should the entry light turn on.

Our Code:

alias: Turn on entry light when door opens in the dark
description: >
  If the front door is opened and it's dark (luminosity below 50 lux),
  turn on the entry light.
trigger:
  - platform: state
    entity_id: binary_sensor.front_door
    from: "off"
    to: "on"
condition:
  - condition: numeric_state
    entity_id: sensor.entry_luminosity
    below: 50
action:
  - service: light.turn_on
    target:
      entity_id: light.entry_light
    data:
      brightness_pct: 80
      transition: 1
mode: single


Leave a Reply

Your email address will not be published. Required fields are marked *