I’m not sure if I’m doing this wrong – I checked the help for ‘Entities’ and ‘Scene’ to make sure I’m doing this right but it appears it’s not working (no errors, even if formatting looks wonky here); here’s my config:
configuration.yaml
scene:
- name: Cool White
entities:
light.living_room_east_lamp: on
light.living_room_west_lamp:
state: on
rgb_color: [255,207,120]
brightness: 255
color_temp: 153
xy_color: [0.4575,0.4099]
- name: Relax
entities:
group.livingroom_lights:
state: on
rgb_color: [243,179,80]
brightness: 144
color_temp: 447
xy_color: [0.5019,0.4152]
Can scenes be applied to groups? In this case, here’s the group I’m targetting:
I tried both by specifying individual lights and the group that contains both lights but I can’t get the scene to trigger any change for those lights.
Do I need an automation to trigger the scene change? I do have a group/card in the default view with the scenes listed and I figured if I click “Activate” it would do something but it doesn’t do anything.
Tried as you suggested; clicking activate on the scene doesn’t do anything. Doesn’t matter if it’s group-based or individual light based; I’m going to try a single light and see how it works out.
Actually you’re right – once I dropped all THREE of the statements you mentioned, the scenes now activate Now to get it working from input_select Thanks!
Just in case anyone is interested, found this in another post on the forum to switch scenes based on input_select list (I copied all the Hue scenes from the Android app into HASS; ie: Relax, Arctic Aurora, etc):
automations.yaml
- alias: Living Room Scene
trigger:
platform: state
entity_id: input_select.livingroom_scene
action:
- service: scene.turn_on
data_template:
entity_id: scene.{{ states.input_select.livingroom_scene.state | replace(' ', '_') | lower | string }}
I don’t use the hue.set_hue_scene, I manually created HA scenes using the hue app on my phone and watching the config change in HA dev panel. In the first post you can see two scenes I’ve copied. From there, I use the snippets above (input_select) and the automation to dynamically select the scene based on value from input_select
I know I can use the scenes from the hub but I read somewhere that to make room, the hub will remove least-used objects to make space meaning they could be deleted. Was easier to copy them plus it allows me to alter them as I see fit from within HA rather than the app.
interested to see what you’ll end up with as a full set. Maybe create a package?
would be cool to have the same logic automatically work based on the group_name, and not have to code it all for all groups separately. some extra templating would be needed.
I may try to adapt the existing stuff to use hue built-in scenes but based on what’s in the thread, you may be able to beat me to it (everything is here) – I’m pretty happy with what it is now but I have noticed it doesn’t update with what is currently on the hub (ie; my wife changes it with the app, HA doesn’t adapt display-wise) so I may need to refactor it anyways
Try both I’m still pretty new to HA and learning as I go! If you find a solution, that’d be great.
edit: I was reading this which is why I did it in the syntax I did:
edit: also states the group_name is not the HA group name we’d use but the name in the Hub. In my HA, it pulls in the Hub groups, ie: light.kitchen or light.mudroom
this is better, though im having an error reporting more groups with the same name. Which might be true, cause the Hue Hub creates its own groups. Have t check those, will be for tomorrow though
I’m wondering if this is working for anyone else. I was able to get the config to change the scene, but only certain scenes work when triggered from HA.
The working code: data_template: group_name: Office scene_name: {{ states.input_select.office_scene.state }}
In my case Read, Concentrate, Savanna sunset, Tropical twilight, and Spring blossom all work fine, but Energize, Relax, Dimmed, Arctic aurora, and Nightlight do not work.
talking Philips Hue now:
as of the latest Hassio firmware upgrades, the hue.hue_activate.scene in Hassio is crippled (among other issues) and has something to do with identically named scene for multiple groups.
Your issue sounds very close to that…
Since it works perfectly from within the Philips Hue App, we can be at least assured the Hue system itself works just fine
maybe you can use this, which works perfectly, when Hue is well integrated in Hassio (which it now isnt…)
I know this is an older thread, but I would be interested in knowing if anyone has worked out the formula Hue use to create scenes, or at least the XY Color codes per globe?
I am interested in migrating all the scenes into Home Assistant, not just for use with Philips Hue globes, but also so they are available with other color globes, including WiFi ones, that can not utilise the Hue Bridge at all.
Ultimately, I want to use the scenes purely in HA so I can actually decommission the Hue Bridge fully given the ZHA component supports Hue Globes and there are components to use the REST API and other options for all Hue accessories to work in HA without a Hue Bridge.