Scene Presets: Hue-like scenes for generic light entities

You need to add it to your automations or buttons to Call A Service, select Scene Presets: Start dynamic scene and then set the preset ID of the scene you like and any other config you like.

I have mine setup on Hue Switches and the HUE Button activates the Scene. An important piece to note it does not work with Light Groups. You need to select each Light Entity.

@Hypfer Another thing as a feature request is to be able to use Light Groups instead of individual light entities. If I wanted to setup all my house with a scene that would involve adding over 100 light entities. :open_mouth:

Fantastic, thank you!
Simples :rofl:

1 Like

You mean Zigbee groups? Thatā€™s not possible.
Essentially, Zigbee groups are a single light. They all listen to the same address/have the same shared group identity on top of their individual one and thus behave as one. Because of that, you canā€™t resolve a zigbee level group to its individual lights from Home Assistant.

The hue bridge can do that because it has insight into the zigbee layer but that canā€™t be replicated by this custom_component.

What you can do though is use group entities or areas and devices in Home Assistant. The integration can resolve those three and fetch the individual light entities from them.

Not Zigbee Groups but standard Helper - Group - Lights. I was thinking that it should work with them but when selecting a light group and running a dynamic scene they are all to be the same colour cycling through the dynamic scene. If you set the entities individually then each light will be different which is similar to the way the Hue app does it.

Well I know for a fact that it works with Home Assistant groups because I specifically built it like that since I use it exactly like that.
Maybe your group accidentally contains a zigbee group light entity that then sets all the lights to the same color?

Whatever it is itā€™s user error so please refrain from making bold claims like ā€œyou have to use it like thisā€ without the knowledge to back them up. That is just going to confuse other people.

So I must be a setting I have missed or something then or is it something else?

I have my lights setup as follows IN Z2M:

I have no Zigbee Groups:

I have Helper - Group - Light

And the entities assigned are the names assigned from Z2M:

My automation when set like with separate entities produces individual colors on each light and changes dynamically fine.

If I set the automation to the Light Group it shows the same color on all the bulbs and then cycles through the colors (all the same)

So what am I doing wrong? This is repeatable in my situation. And as for making bold claims, not making any claims at all, just adding my experience in setting it up with the documentation provided through trial and error on how I got it all working.

2 Likes

image

Thatā€™s a light entity and not a group one.

Okay.
As it turns out, groups set up via the UI arenā€™t of type group.

Thatā€™s new to me, because Iā€™ve been using Home Assistant for so long, Iā€™m still doing many things in the YAML configuration.

In that, you do

group:
  rgb_effect_lights:
    name: RGB Effect lights
    entities:
      - light.schreibtisch_signes
      - light.playbar_schreibtisch
      - light.signe_kuche
      - light.sofa
      ....

That results in

But if you set one up via the UI, itā€™s a light that is also partly a group?

And because itā€™s a light, the code currently doesnā€™t resolve it further.
So in the stupidest way possible, weā€™re both right.

Iā€™ll dig into the code to see how to identify these groups posing as something else and will publish and update that resolves them properly soon.

Thanks for the detailed step by step recreation. That helped :slight_smile:

2 Likes

Yay, not crazy! :smiley:

Never thought of making the light groups via YAML. Happy that the steps helped you identify the issue with the UI groups.

I can finally say goodbye to my Philips Hue Hub! :smiley:

Fixed with 1.1.1

Iā€™ve also noticed that it is possible to build loops with groups.
The new resolver should be resilient against that but Home Assistant itself and its core services donā€™t seem to be so donā€™t do that.

2 Likes

@Hypfer Many thanks for the quick update of the code! I have tested it and it works perfectly.

I made one change on my end to my Helper Groups. I had Helper Light Groups inside of Helper Light Groups (Kitchen All Group and inside that the light groups Kitchen Bench, Kitchen Sink, Kitchen Galley) and that didnā€™t work but once I added each individual light entity to Kitchen All and then called the helper groups it worked fantastic!

Also I will write up later on how I have it working with the Philips Hue Switch and the buttons with Scene Presets.

Again, many thanks for this Custom Component. Itā€™s brilliant! :smiley:

Sorry, that shouldā€™ve worked. But I didnā€™t test it, again :slight_smile: , because I donā€™t have a dev setup with a debugger and printf debugging is annoying. Oh well.

My bad. Fixed with 1.1.4
You should now be able to use that helper group structure.

Tested with Group ā†’ Group ā†’ Group ā†’ Light

1 Like

Thank you @Hypfer. Iā€™ve been wanting to ditch my hub and the scenes were the only things keeping me attached to it.

Also, this is the final piece needed for ā€œHA Wife Approvalā€, as she loved the Hue Scenes and I had been manually integrating them (also to work with other brands of bulbs). This is seamless and elegant. Much appreciated!!

1 Like

Has anybody had any luck using the available service calls in Node Red, for which they could share examples? I have not had any luck, and Iā€™m not even sure where to look. For example, when I try to call scene_presets.start_dynamic_scene, and use the helper in Node Red to load example data, it loads examples for everything except ā€œtargetsā€ and I cannot figure out the expected syntax for a single light entity, let alone a list of entities. (Also, I do realize that the presets are called by an ID and not a name anymore, I just left the example data as-is for the screenshot.)

Heyy, thanks a lot for this component. Do you plan on creating a Lovelace card representing a preset

Iā€™m not sure if I understand the question correctly.

You can use any card that can call a service to call a preset.
For example the inbuilt ā€œbuttonā€ card of Home Assistant:

Oh, sorry for being unclear. I meant exporting the style you have for the presets into a card which can be used in the Lovelace dashboard. With a dropdown for the specific preset id so that the name and especially the image are shown.

Something like this:

3 Likes

Thank you for this set of presets, Iā€™ve been waiting for something like to this finally move away from the Hue Bridge and utilise dynamic scenes

A couple of questions which I donā€™t know if the integration caters for or not right now?

  1. If you have multiple light entities running a dynamic scene, there doesnā€™t seem to be a way to control the individual brightness per light right now. Is that correct?

e.g. x4 lights added to a dynamic scene, set up via an automation. Service call toggles the dynamic scene, but only a master brightness level for all lights in that scene?

  1. Is there functionality to fade in the start of the dynamic scene or not? I can only use an automation to fade out the dynamic scene right now, using a time based toggle service to set the brightness to 0 over xxx number of seconds via a transition

Keep up the good work, and hopefully someone can answer the above when possible