Getting a simple scene to work

Hi,

This is my first post after taking the plunge into the wonderful world of Home Assistant :slight_smile:

I am having great difficulty finding out why I cannot get a simple scene to work. Basically I have two lights (more actually but I reduced it to two for simplicity) and I wish to be able to control them together. Here are the contents of my scene:

scene:

  • name: Movie Night
    entities:
    light.dining_ceiling_lights:
    state: on
    brightness: 80
    light.dining_table_lights:
    state: on
    brightness: 80

When I hit the Activate scene button on the home screen, only the first light turns on. I have tried different lights but it will not work with more than one light entity in the scene yet following the example in the docs that’s what it implies. The log file displays a task exception error relating to Python but this only occurs with more than one light in the scene.

Any help here would be greatly appreciated as I’m stuck at this point.

Ian

Hi,

Please use Code and Syntax Highlighting when you post code, or it’s hard to tell what’s wrong with your code.

Oh ok I see what you mean though I’m not entirely sure from reading that information what exactly I need to do when posting a coding snippet. Sorry to sound a bit dumb on this point but this is the first time I have done this so would just need a helpful pointer as to the correct way to post coding on the forums.

Put the code between 3 backticks

```
Your code
```

=

Your code 

Ah thank you. So hopefully then…

scene:
  - name: Movie Night
    entities:
      light.dining_ceiling_lights:
        state: on
        brightness: 80
      light.dining_table_lights:
        state: on
        brightness: 80

what does the state table in dev-tools-states show for light.dining_table_lights?

Actually it doesn’t matter which of my lights I specify, I can put just any one light in the scene configuration on its own and it works fine. As soon as you have two or more as per the example I have given, only one light works and the logs show this:

Error doing job: Task exception was never retrieved
component/light/hue.py (ERROR)

I would raise a bug then as it appears that it’s a problem with hue lights, certainly I have no problems with a mixture of switches and lights of varying types in my scenes (no hue lights unfortunately) and I can’t see an error in yours, you might want to confirm by switching some non hue devices on or off via a scene.