Another Light Blueprint Script ( Module )

Disclaimer: This Blueprint was designed to work in conjunction with A Automation-script of your choosing &or making… Alternatively: Another Light Blueprint Automation

Description:
“Another Light Blueprint Script” only uses the light.turn_on service call & different “effects” like transition, color_temp, brightness_pct, hs_color, & flash (tho I would like to add some more. &or improve the Adaptive & Circadian features). It was design with a variety of Philips Hue lights, so depending on your bulb’s features, some of the “profiles/effects” may not work for you.

What is the point:
I wanted to have granular (but simpler) control over how my lights behaved, & I wanted to be able to easily apply different effects like “colorloop” (that now seems to be depreciated) on the Philips Hue Bridge. So after looking at how other people set things up I came up with a method I liked, but found the code required for Light.turn_on was very generic & long, with only a couple of repeating variables. And I didn’t find many Blueprint-scripts (but heaps of automations) available for lights & none that did what I wanted. So After a lot of repetitive coding I decided to develop this blueprint, with the help of the HAss community. ( But above all, @petro you are A Legend! )

Another Light Blueprint-Script [Lone-Wolf].yaml
Open your Home Assistant instance and show the blueprint import dialog with a specific blueprint pre-filled.

Another Light Blueprint Script [HAssNic’s].yaml
Open your Home Assistant instance and show the blueprint import dialog with a specific blueprint pre-filled.

How I set my system up:
Each Area has 2 input_selects for lights:

  1. First for this blueprint script, that controls how the lights get turned on & how they change via effects (I call “Profile”, but profiles aren’t scripts). So if I always wanting the lights to be bright, Dimmed, Night-light, Colour-Loop, Circadian, Adaptive, Random, Flash or Custom. It would just be selected via A predefined list I can easily put on a Dashboard card.
  2. The second for an Automation Script (Not this Blueprint), that controls if the Lights are On, Off, or Automatically turn On or Off. I have this second Automation-script linked to my first input_select so that depending on the condition of the second input_select it runs this blueprint script to turn on the lights &or change the effects of the light.

How my other Automation-script works.

  • A/ If I change the first “profile” input_select. The automation-script will be triggered & look at the On, Off, Auto input_select selection & ether change the profile/effects (via this blueprint) or do nothing.
  • B/ If I change the second input_select to On, Off, or Auto it will either do nothing, turn the lights off, or run this blueprint.

E.g. Another [HAssNic’s] Trigger Automation But the code is small so I did find it’s easier to bundle that up with other automations for an Area, so the script runs more often & keeping my Automations list tidier.

Prerequisites for this Blueprint:

  • I’m assuming you already have some Lights that you wanted to use.

  • Two helpers, Go to Settings > Devices & Services > Helpers > Create Helper >
    { Dropdown } &or { Toggle }.

    1. input_boolean { Toggle } for the Adaptive profile to activate the Night-Light feature
    2. input_select { Dropdown } with the desired Profile/s (words) added is required.
# Example Config
input_select:
  office_lights_profile:
    name: Office Lights Profile
    options:
      - Bright
      - Dimmed
      - Night-Light
      - Colour-Loop
      - Circadian
      - Adaptive
      - Random
      - Themed
      - Custom
      - Aurora
      - Flash
      - None
      - "."
    initial: Adaptive
    icon: mdi:form-select

This Blueprint current profile descriptions:

  • Bright. - (For Day time & Events, when you need to be Awake; Bright eyed & bushy tailed).

  • Dimmed - (For after sunset & before sunrise when you’re (still) thinking about bed, but I will want to be able to read the Funny pages).

  • Night-Light - (For bed/sleep time, & you don’t want to wake everyone else up, but you still want to see in an emergency; how to get to the Fridge).

  • Colour-Loop - (Was to be Aurora-Australis, but color-loop is easier to remember).

  • Circadian - (For the rest of the house at night, & to get everyone in sync @ night with you)
    [Changes from Bright {daytime}, Dimmed {evening & early morning}, & Night-Light {bedtime}].

  • Adaptive - (This works really well with a bed/sleep input_boolean)
    [Changes from Bright {daytime}, Dimmed {evening & early morning}, & Night-Light {input_boolean}].

  • Random - (A Sorely missed replacement to the light effect).

  • Custom - (Utilise this when using scenes & applying custom colour effects).

  • Flash - (works great in conjunction with Alarm Panel Automations).

If you like this, &or would like more “profiles” (effects), please post your suggestions here?
I have been thinking about adding “morse-code”, “Clock”, “Aurora-Australis”

<sub> signed Rumpelstiltskin </sub>

3 Likes

I’d be interested in a morse-code option, I was thinking of ways I could use home-assistant to create a basic escape room for my kids and being able to quickly set up a morse-code helper would be pretty cool

I will probably start working on A Morse-Code version in the new year, but there is two fundamental problems with it regarding time.

  1. Over coming commands on the light greater than 1 second between intevals
  2. Read Wright problems on A SD

Yeah, I was playing around with manually controlling a light connected via Zigbee last night using an automation where it would turn on, delay for a second, turn off, delay for another second and so on to blink out an S.O.S. message. Then the whole thing would repeat after delaying 5 seconds. It was definitely not-successful, lol.
Very quickly the lights would get out of sync and miss blinks. I think a better solution would be to upload the code to an ESP8266 with a relay in it and hide the whole thing in a lamp base and put an “old fashioned” incandescent light bulb in it as LED and Fluorescent bulbs might not be able to turn on and off quick enough in general… oh well, something to think about.