ATAT23
April 26, 2021, 11:16pm
1
hello I’m trying to get an automation working iv tried a good lot of things that I feel maybe are now old or something but here goes
I’m trying to get a set of lights to turn on and off when my front door sensor pings my HA
i tried listing them separately but code runs from top down so i would have light 1 on of then light 2 on off and thats not what i wanted
i tryed geting groups working but after putting
light groups
light:
platform: group
name: alarm lights
entities:
light.00468516807d3a7ac60f
light.00711728f4cfa2c9121a
light.06708663840d8e6b414a
light.40401887dc4f22babe44
light.4605020368c63ae7b440
light.76518007e098069d7e0f
light.bfe4769a9c7e492385c9gf
in confi.yaml it didnt work
so I put all the entities to gether in my automation
type: toggle
entities:
light.00468516807d3a7ac60f
light.00711728f4cfa2c9121a
light.06708663840d8e6b414a
light.40401887dc4f22babe44
light.4605020368c63ae7b440
light.76518007e098069d7e0f
light.bfe4769a9c7e492385c9gf
domain: light
type: toggle
entities:
light.00468516807d3a7ac60f
light.00711728f4cfa2c9121a
light.06708663840d8e6b414a
light.40401887dc4f22babe44
light.4605020368c63ae7b440
light.76518007e098069d7e0f
light.bfe4769a9c7e492385c9gf
domain: light
witch works for just the top entity
any help would be amazing
and sorry for probably posting in the wrong place but ill learn lol
thanks again
pedolsky
(Pedolsky)
April 27, 2021, 12:13am
2
Hello and welcome!
The correct indentation is important. Because of that could you please so kind and use the code formatter here? It‘s this button in the editor:
</>
At the moment it seems to me that the indentation of your light group is wrong. The correct way is:
# Example configuration.yaml entry
light:
- platform: group
name: Alarm Lights
entities:
- light. ....
- light. ....
- light. ....
This should create a new light group entity named light.alarm_lights
.
For example you now could create a script like this on:
script:
blinklicht:
alias: 'Blinklicht'
sequence:
- service: light.turn_on
data:
entity_id: light.alarm_lights
- delay:
seconds: 1
- service: light.turn_off
data:
entity_id: light.alarm_lights
- delay:
seconds: 1
- service: light.turn_on
data:
entity_id: light.alarm_lights
- delay:
seconds: 1
- service: light.turn_off
data:
entity_id: light.alarm_lights
and put this in an automation action. As I said, this is just one example of many.
1 Like
ATAT23
April 27, 2021, 12:41am
3
thank you for giving some of ur time to help i will work of this and see how i get on with it
qoheleth
(Russell Smith)
April 27, 2021, 4:42am
4
One additional item here, but not concerning your automation (where I agree with pedolsky):
t’s very helpful to those of us who are reading through the titles to see if we might be of assistance if you provide a brief idea of the problem in the title.
In your case, “Help with automating light groups” would be more informative.
By all means keep asking questions. I find this forum full of folks who are very informed and very helpful.
1 Like