Wake-up light alarm with sunrise effect

Also if you are seeing this not triggering, could you please check the sensor.date_time_iso state (e.g. under Developer Tools - States) matches your local date and time (according to your Timezone) to within a minute.

Also please check your Timezone is set correctly in the general settings of HA.

Hi

Ok, I have it. It’s not fault of your blueprint, but simply flux_led integration is disaster…
I reinstalled blueprint and with MQTT seems to work very well!
So far it didn’t work only once, no idea why (alarm was not triggered)
Thank you very much for awesome blueprint :slight_smile:

1 Like

Hey there… i use an analog RGB Strip with a pca9685 12-bit PWM driver.
I already was able to get this strip working on a light-card on the dashboard via this yaml:

yaml
esphome:
  name: rgb_led_bed
  platform: ESP8266
  board: d1_mini

wifi:
  ssid: "xxx"
  password: "xxx"

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "Rgb Led Bed Fallback Hotspot"
    password: "xxx"

captive_portal:

# Enable logging
logger:

# Enable Home Assistant API
api:
  password: "xxx"

ota:
  password: "xxx"
  
# Enable Web-Server
web_server:
  port: 80
  
time:
  - platform: homeassistant
    id: homeassistant_time
    timezone: Europe/Berlin

# Example configuration entry
i2c:
  sda: D2
  scl: D1
  scan: True
  id: bus_a

# Example configuration entry
pca9685:
  frequency: 500

#Outputs
output:
  - platform: pca9685
    id: 'pca9685_output0'
    channel: 0
    max_power: 0.80
  - platform: pca9685
    id: 'pca9685_output1'
    channel: 1
    max_power: 0.72
  - platform: pca9685
    id: 'pca9685_output2'
    channel: 2

# Example configuration entry
light:
  - platform: rgb
    name: "strip1"
    id: strip1
    restore_mode: ALWAYS_OFF
    default_transition_length: 2s
    red: pca9685_output1
    green: pca9685_output2
    blue: pca9685_output0

How to adapt the blueprint of this thread to my RGB LED Strip?
There don’t seem to be “mired” anywhere

sorry if this is a lame question… i’m new to hassio

nevermind… this was a timezone-conflict between device and hassio… fixed it and it works now =)

Is it possible to adjust color-effect in this blueprint? i would like to have a more warm color-fade… currently it is only brightness-fade.


p.s. ever thought about automaticaly fade in some audio-file parallel to the brightness?


p.p.s. is it possible to use complete bandwidth of 12bit pwm? 4096 steps are much better than 255, when it comes to low-light.

Color effect is usually auto-detected based on color temperature ability of the light as exposed by HA. I did not add explicit RGB support since I don’t have any lights that only expose RGB but not color temperature and translation between color temperature and RGB does not seem to be straight forward at first glance. Does your LED support setting color via color temperature as well, e.g. light.turn_on call with color_temp attribute?

You can trigger playing an audio manually using the pre-sunrise actions but there is currently no possibility to do volume adjustment during sunrise and no plans from my side to implement this currently.

Not sure whether those 4096 steps are actually exposed to HA. Afaik light brightness values in HA are normalized from 0 to 255 (i.e. brightness value in light.turn_on call).

1 Like

Ok, so I can’t work out how to add a manual time for the alarm. Any hints?

I have read the meagre paragraph about updating the config.yaml file, but I am none the wiser as to where I actually put the alarm time into the config?

Is it a helper? in the config.yaml file? blueprint? automation (there’s no field there)?

If you have a recent version of the blueprint, manual alarm time is simply the third Parameter you can input (like the light entity). No need for helpers anymore.

I have the latest version (and to check I have just re-imported it from the gist).
In the automation screen I see the section for the manual alarm time, but there is no input controls or place to enter the time, it’s blank to the right

Sorry my bad. Small typo must have found its way in the latest version. I have fixed the gist and forum post here. Should work after again after reimport.

Perfect, works now.

Hi there
Can I have a minimum brightness slider with this blueprint script? I have these gledopto led bulbs and they don’t turn on when brightness is set below 15%. Don’t know why they do that…

The most recent version of this blueprint doesn’t seem to work with my Floalt panel.

I’m using a set time, and when the time comes for the event to start, I do see a trigger appear in the history of the automation, but the panel doesn’t turn on.
I tried it with a few different (tradfri) lights in my house as well, and none of them turn on with this blueprint.

(I also don’t see the action of turning on the panel in its history)

Do I need to add something in the pre-sunrise section for the light to work?

edit
I’m not using the Tradfri hub, I’m using the ZHA integration to communicate with the Floalt panel. Turning it on and off and such does work from within Home Assistent. Just not through this blueprint for me. But perhaps I’m missing something.

Normally not. What version of HA are you running? I’m seeing weird behavior after upgrading to 2020.12.2 today… Need to investigate.

I upgraded to the latest version of HA core today too. That might be it? (I’m pretty new to Home Assistant, installed it last night)

I initially had some issues with the wait_templates, and ended up swapping the substraction of - as_timestamp(now()) to - as_timestamp(states('sensor.date_time_iso')), which seems to have made it able to run through them.

I’m running HA 2020.12.2 and get the timestamp_sensor from the android companion app.

You can have a look in my fork of your gist: https://gist.github.com/tom-erik-l/3191262c06936377fb136ae4c367297c
I also did some changes re. the quotes, since I wasn’t sure if they were causing any issues.

1 Like

Just noticed something with this - had to restart HA and it took a while - it said “stopping scripts from running too long after shutdown” and listed the 3 automations that use this script.
Today happens to be a day when none of those devices would have had an alarm set, and as I’m using Alexa devices, the next alarm entities are all “unavailable”.
Not a big deal, but thought it worth mentioning.

@tom-erik-l Thanks. I personally never had issues with using a timestamp sensor. We are using the blueprint automation at home every workday to wake-up. But I just noticed that manual time causes a weird exception in HA. I have opened a ticket here: https://github.com/home-assistant/core/issues/44699

@Marcel_80 issue is not on your side. Let’s see what we get about the issue above.

@sbyx I was using a manual timestamp e.g. "17:00:00" for testing, so that might have been the cause. Though swapping out now() for date_time_iso sensor seemed to allow it to run fine with the manual timestamp.

Got it. I added a work-around that seems to do the trick. Mainly replaced “now().date()” with “states(‘sensor.date’)”. This requies the ‘date’ sensor to be enabled alongside ‘sensor.date_time_iso’ however it seems to not suffer from the bug.

The new version fixed the issues I was having. Thanks!

1 Like

I tried this with the Ikea tradfi bulbs and ikea tradfi hub
But they don’t do anything.
What I’m doing wrong?
Or is it just not possible with these bulbs?

Mvg