Help with getting scene working

Greetings.

I need help with getting this scene working with my Philips Hue lights. I am running Hassio 0.53.0.
I followed the guide found here (Dim lights when playing media).

Here is what my code looks like. It is located in the configuration.yaml file.

scene:
  - name: Mattias
    entities:
      light.datorlampa
        state: on
        transition: 30
        brightness: 200
        xy_color: [ 0.6286, 0.3141 ]
      light.datorrum_taklampa_1
        state: on
        transition: 30
        brightness: 214
        xy_color: [ 0.371, 0.1807 ]
      light.datorrum_taklampa_2
        state: on
        transition: 30
        brightness: 214
        xy_color: [ 0.5877, 0.3863 ]

However, when I ask HA to check my config file it says that the file is valid but then puts this into the log.

2017-09-13 19:12:31 ERROR (SyncWorker_0) [homeassistant.util.yaml] mapping values are not allowed here
  in "/config/configuration.yaml", line 114, column 14
2017-09-13 19:12:31 ERROR (MainThread) [homeassistant.bootstrap] Error loading /config/configuration.yaml: mapping values are not allowed here
  in "/config/configuration.yaml", line 114, column 14

Line 114 is the line in which I have written: state: on
Where did I go wrong with this one? :sleepy:

You are missing the : after each of your light names.

scene:
  - name: Mattias
    entities:
      light.datorlampa:
        state: on
        transition: 30
        brightness: 200
        xy_color: [ 0.6286, 0.3141 ]
      light.datorrum_taklampa_1:
        state: on
        transition: 30
        brightness: 214
        xy_color: [ 0.371, 0.1807 ]
      light.datorrum_taklampa_2:
        state: on
        transition: 30
        brightness: 214
        xy_color: [ 0.5877, 0.3863 ]

Ah yes! I must be blind.

Thank you very much, it works now. :smile:

1 Like