Proper Syntax for Scenes

I have been stuck trying to get an !include scenes.yaml to work with the “scenes” entry for my Hunter Douglas PowerView shades.
I have the following entries in config:

scene:
  - platform: hunterdouglas_powerview
    address: 192.168.135.191
scene: !include scenes.yaml

And get the following error in my logs:
2017-12-28 17:35:22 ERROR (SyncWorker_10) [homeassistant.util.yaml] YAML file /config/configuration.yaml contains duplicate key "scene". Check lines 128 and 131.

(referring to the lines I posted above)
How do I integrate both “scenes?”

Changed it to:

scene:
  - platform: hunterdouglas_powerview
    address: 192.168.135.191
  - !include scenes.yaml

And still getting error:

2018-01-01 15:42:04 ERROR (MainThread) [homeassistant.config] Invalid config for [scene]: expected a dictionary for dictionary value @ data['states'][0]['entities']. Got None. (See /config/configuration.yaml, line 129). Please check the docs at https://home-assistant.io/components/scene/

Put your hunterdouglas scene config into scenes.yaml

So I tried that and now have this error:

2018-01-01 16:53:37 ERROR (SyncWorker_0) [homeassistant.util.yaml] mapping values are not allowed here
  in "/config/scenes.yaml", line 61, column 12
2018-01-01 16:53:37 ERROR (MainThread) [homeassistant.bootstrap] Error loading /config/configuration.yaml: mapping values are not allowed here
  in "/config/scenes.yaml", line 61, column 12

For reference, this is the snipped of my scenes.yaml entry:

- name: Lights Out
  entities:
  - light.bedroom_dimmer: off
  - light.tv_lightstrip: off
  - light.shower_light_1: off
  - light.shower_light_2: off
  - switch.master_bathroom_mirror_: off
  - switch.bathroom_fan: off
  - group.island_lights: off
  - group.cabinets: off
  - switch.track_lights: off
  - switch.under_bar_lights: off
  - switch.great_room_lightstrip: off
  - switch.recipe_center_: off
  - switch.shelf_lights: off
  - light.living_room_dimmer: off
  - switch.entertainment_center: off
  - light.living_room_tv_hue_lightstrip: off
  - switch.wemo_mini: off
  - light.dining_room_dimmer: off
  - light.dining_room_accent: off
  - light.hue_bloom_1: off
  - light.6001948ab626_192168135215: off
  - light.guest_room_bedside_lamp_: off
  - switch.hallway: off
  - switch.office_light: off
  - light.entryway: off
  - switch.dog_run_lights: off
- platform: hunterdouglas_powerview
    address: 192.168.135.191

Since I was unable to resolve this issue, I deleted my scenes and turned them into scripts :confused:

HI…

Could you share the scripts ? I can use it as a reference to create mine. Thanks.

I just used the built-in Script editor and it turned out something like this:

'1515255984082':
  alias: Lights Out
  sequence:
  - service: homeassistant.turn_off
    entity_id:
    - switch.dans_nightstand_
    - light.kevins_nighstand
    - light.bedroom_dimmer
    - light.tv_lightstrip
    - light.island
    - light.cabinets
    - light.shower
    - switch.track_lights
    - switch.under_bar_lights
    - switch.great_room_lightstrip
    - switch.recipe_center_
    - switch.shelf_lights
    - light.living_room_dimmer
    - switch.entertainment_center
    - light.living_room_tv_hue_lightstrip
    - light.dining_room_dimmer
    - light.dining_room_accent
    - light.hue_bloom_1
    - light.6001948ab626_192168135215
    - light.guest_room_bedside_lamp_
    - switch.hallway
    - switch.office_light
    - light.entryway
    - switch.outdoor_outlet
  - service: media_player.media_pause

That didn’t work because the last line is indented: address: xxxxx should only have 2 spaces. FYI whenever you get an error, it will tell you a line number and character number. Use a text editor to find that spot and fix the issue:

so, your error was caused by line 61 column 12. Column basically means the 12th character.

1 Like

Is there really no solution to defining scenes and using PowerView scene in the same config???

Waking up an old issue as I have the same problem and see no solution. How do I include scenes.yaml AND use the powerview scenes?

Going off what OP posted, do this:

scene:
  - platform: hunterdouglas_powerview
    address: 192.168.135.191
scene 2: !include scenes.yaml

No underscore, must be a space.

:+1:thanks