Reading light for my son using an ESP32

My son loves to read, he’s a real bookworm.

To help him wind down before sleep, we let him read for about an hour after we send him to bed. Because I don’t want the bright room lights on during this time, I set up a small LED strip connected to an ESP32, mounted in a short piece of LED profile I had left over.

In Home Assistant, I created an automation that turns his reading light on and off.

alias: Reading light
description: ''
triggers:
  - trigger: time
    at: '20:15:00'
    id: reading_light_on
  - trigger: time
    at: '21:30:00'
    id: reading_light_off
conditions: []
actions:
  - choose:
      - conditions:
          - condition: trigger
            id: reading_light_on
        sequence:
          - action: light.turn_on
            target:
              device_id: [DEVICE ID]
              entity_id: [ENTITY ID]
            data:
              brightness_pct: 100
      - conditions:
          - condition: trigger
            id: reading_light_off
        sequence:
          - action: light.turn_off
            target:
              device_id: [DEVICE ID]
              entity_id: [ENTITY ID]
mode: single

Find me online

neomess.nl
github.com/neomess


Special thanks

home-assistant.io
kno.wled.ge (WLED)
Pexels.com for stock photo's

Contact

Email to info@myprojects.nl or ask your question using the form below.