sanderd
(SanderD)
December 6, 2021, 10:45am
1
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.
sanderd
(SanderD)
December 6, 2021, 10:49am
3
@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
tom_l
December 6, 2021, 11:10am
5
sanderd:
entity_id: light.Bedroom
No capital letters in entity ids.
1 Like
sanderd
(SanderD)
December 6, 2021, 11:46am
6
Changed all capital for lowercase.
Still got the error
petro
(Petro)
December 6, 2021, 12:13pm
9
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.
tom_l
December 6, 2021, 12:14pm
11
It’s not a group. It’s a light group platform, that produces light entities, not groups.
petro
(Petro)
December 6, 2021, 12:14pm
12
Scripts are a dictionary, I don’t think that won’t work. Alias should go in line with sequence IIRC.
tom_l
December 6, 2021, 12:15pm
13
I’m 100% sure now. Look at the grey header text in the screenshot. I missed that.
petro
(Petro)
December 6, 2021, 12:16pm
14
Yes, I said 99% because there could be other errors in his script
1 Like
sanderd
(SanderD)
December 6, 2021, 12:16pm
15
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.
tom_l
December 6, 2021, 12:18pm
16
What is this?
sanderd:
GroupOn:
It’s not a script. As it is not in your scripts.yaml file - and you are using capital letters again.
petro
(Petro)
December 6, 2021, 12:20pm
18
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.
tom_l
December 6, 2021, 12:22pm
19
You can use capital letters for aliases, names or friendly_names. Assume that you can’t use them pretty much everywhere else.
petro
(Petro)
December 6, 2021, 12:23pm
20
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
sanderd
(SanderD)
December 6, 2021, 12:25pm
21
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?
petro
(Petro)
December 6, 2021, 12:26pm
22
configuration → scripts and play the script. Or just use the light.bedroom entity.