Blueprint/Automation from Device Powered On

Hi, I have a blueprint that I’ve used to create an automation which cycles colors on my lights. I am trying to have the lights default to that automation when they are powered on.

My current attempt is an automation which triggers “When” the device changes “From” “Any State” to “On”.

This however, does not start the color cycling. Instead, the light is set to the latest solid color it was set to.

How can I fix this? Alternatively, is there a setting for lights to just return lights to their last setting when they have been turned off and then back on?


In general, Home Assistant does not seem to know if my devices are on or off…

  1. What does your automation look like. Here are some pointers on formatting code in here: How to help us help you - or How to ask a good question.
  2. Did your automation trigger at all. You can look at the traces to see if it triggered, it will leave a trace.

TBH a easy automation is all you need to do this. You should always write an automation as the basis for your blueprint automations anyway. Makes it easier.

An automation for this would trigger when the light goes from any to on, delay like 5 seconds, and start up your random color script or actions.

Hi @Sir_Goodenough,

Thanks for the tip on formatting. The YAML for this automation looks like this:

alias: Overhad Blucycle Color Loop From Any Automation
description: ""
  - platform: state
      - light.ledvance_a19_g2_rgbw_light
    to: "on"
    from: null
condition: []
  - service: automation.turn_on
    metadata: {}
    data: {}
      entity_id: automation.color_loop
mode: single

The from: null I would eliminate. Lights are never at a null state so it will never trigger. If you say ONLY to: "on" it will trigger when the light is turned on no matter what state it is in, including on. Another possibly useful thing to put there is from: "off". (Automation Trigger - Home Assistant)

Then, automation.turn_on is not doing what you think it is doing there. That command enables the automation to look for triggers and function. It does not make the automation trigger. (Automation services - Home Assistant)

You may want to either add the trigger here to the automation.color_loop thing, or turn automation.color_loop into a script and call that action with a service call. (Scripts - Home Assistant)