Please help , Beginner HASSIO and Light Groups

Hi All,

Last weekend i have installed Home Assistant on a VM. (For a test to switch from Homey to HASSIO)
All working great, but i can not get the light group(s) working.

Can you please help me with the basic start?

Groups.yaml
light:

  • platform: group
    name: Bedroom
    entities:
    • light.shellycolorbulb_98cdac1dfdc2
    • light.shellycolorbulb_98cdac1eff2ckk

Scripts.yaml
script:
turn_on_bedroom_lights:
alias: “Bedroom”
sequence:
service: light.turn_on
target:
entity_id: light.Bedroom
data:
brightness: 100

While saving Scripts.yaml i get the error:
"Missing property “secquence”
and
“property turn_on_bedroom_lights is not allowed”

Please help. When understanding the basic with a working group, i will manage the others by myself right?

Thanks a lot!

Please post your yaml as preformatted text (</> in the toolbar). It’s very difficult to follow otherwise.

@Stiltjack ; thanks for the tip.

light:
  - platform: group
    name: Bedroom
    entities:
      - light.shellycolorbulb_98cdac1dfdc2
      - light.shellycolorbulb_98cdac1eff2ckk



script:
  turn_on_bedroom_lights:
    alias: "Bedroom"
    sequence:
      service: light.turn_on
      target:
        entity_id: light.Bedroom
      data:
        brightness: 100

No capital letters in entity ids.

1 Like

Changed all capital for lowercase.
Still got the error

image

image

Don’t put the word script inside scripts.yaml when script is included via configuration.yaml.

I.e. If this is in configuration.yaml:

script: !include scripts.yaml

Dont put script: in the file.

I’m 99% sure you’re doing this. Your script.yaml file should just be:

turn_on_bedroom_lights:
  alias: xyz
  sequence:
  ....

Also, please stop posting images. No one wants to fix your malformatted code by retyping the entire thing. Thanks.

If he’s turning on a group of lights, shouldn’t it be something like:

script:
  turn_on_bedroom_lights:
    alias: "Bedroom"
    sequence:
      service: homeassistant.turn_on
      target:
        entity_id: group.bedroom

Not sure if you can have brightness in this case.

It’s not a group. It’s a light group platform, that produces light entities, not groups.

Scripts are a dictionary, I don’t think that won’t work. Alias should go in line with sequence IIRC.

I’m 100% sure now. Look at the grey header text in the screenshot. I missed that.

Yes, I said 99% because there could be other errors in his script :slight_smile:

1 Like
light:
  - platform: group
    name: bedroom
    entities:
      - light.shellycolorbulb_98cdac1dfdc2
      - light.shellycolorbulb_98cdac1eff2ckk

GroupOn:
  service: light.turn_on
  target:
    entity_id: light.bedroom
  data:
    brightness: 100

I now have this script. in my Configuration.yaml.
No errors. but where to find the “virtual” device? so i can test if the group works.
I have tried to add him to the dashboard, but “group.bedroom” can not be found.

What is this?

It’s not a script. As it is not in your scripts.yaml file - and you are using capital letters again.

:frowning: my bad. restored.

That’s not correct, what is that supposed to be doing? You can’t just copy/paste things randomly in your configuration and exepct it to work. You have to follow the rigid configuration format. If that’s your script, then you need to put it into scripts.yaml if you have script: !include scripts.yaml in your configuration file. Secondly, no more capitals in fields.

You can use capital letters for aliases, names or friendly_names. Assume that you can’t use them pretty much everywhere else.

configuration.yaml:

light:
  - platform: group
    name: bedroom
    entities:
      - light.shellycolorbulb_98cdac1dfdc2
      - light.shellycolorbulb_98cdac1eff2ckk

then somewhere else in configuration.yaml

script: !include scripts.yaml

Then in script.yaml

turn_on_bedroom_lights:
  alias: "Bedroom"
  sequence:
    service: light.turn_on
    target:
      entity_id: light.bedroom

So basically, i have multiple Shelly GU10 light bulbs RGB.
Those are attached above the TV and next/above the bed.

I would like to have 1 device that i can switch, dimm, change color in stead of 6 individuals.

I now have copied @petro his script to the yaml files and saved. no errors so far.
How can i test run the script?

configuration → scripts and play the script. Or just use the light.bedroom entity.