Simple time based and light group based ruled

I am a newbie exploring rules, and I don’t get light groups to work.

This works:

Configuration.yaml:
group: !include groups.yaml
light: !include lights.yaml
automation: !include automations.yaml

automations.yaml
- id: id_LivingRoomEvening
  alias: LivingRoomEvening
  trigger:
   - at: '23:36'
     platform: time
  action:
    service: light.turn_off
    entity_id: light.zipato_bulb_2_level

But this doesn’t: (trying to use lights group)

Configuration.yaml:
group: !include groups.yaml
light: !include lights.yaml
automation: !include automations.yaml

automations.yaml
- id: id_LivingRoomEvening
  alias: LivingRoomEvening
  trigger:
   - at: '23:36'
     platform: time
  action:
    service: light.turn_off
    entity_id: light.Outdoor_allLamps

lights.yaml
    - platform: group
      name: Outdoor_allLamps
      entities:
       - light.zipato_bulb_2_level

Why doesn’t the second alternative work and how should it be written?

entity_id’s don’t have capitals.

light.outdoor_alllamps

also, you should see if you configured that correctly. You miss spelled “ligths.yaml” in your example. It’s unclear if that’s the case in your setup.

Thanks,
I fixed the lights typo in my post. My automation was correctly spelled.

I changed to:

[automation]
  action:
    service: light.turn_off
    entity_id: light.test_example_lamp

[lights]
    - platform: group
      name: test_example_lamp
      entities:
       - light.zipato_bulb_2_level

But still no cigarr.

is that the name of the light entity? look in the states page

Not 100% sure what you ask for, but yes I think so. It does though have a name override: ReadingLamp.
The names are cut’n paste from automation created in the GUI, so I suppose they are right.

go to the developer tools -> states page and look for the entity.

1 Like

Thanks, Yes it seems so.


[light.zipato_bulb_2_level] (http://someAddress:8123/developer-tools/state#)     

on 

min_mireds: 153 
max_mireds: 500 
brightness: 255 
color_temp: 327 
hs_color: 240,100 
rgb_color: 0,0,255 
xy_color: 0.136,0.04 
node_id: 22 value_index: 0 
value_instance: 1 
value_id: 72057594411843585 
friendly_name: ReadingLamp 
supported_features: 51

I think perhaps the indentation is off in your lights.yaml. It is different from automation.yaml.

You can check in the States pages also for the light group, see if it’s present? light.test_example_lamp

1 Like

Thanks, that moved me forward. I didn’t see any formatting errors, and all changes I did gave me errors when I did “Check Config” under Configuration->ServerControl.

But after an upgrade and a reboot , the [light.test_example_lamp] showed up in States tab under Developer Tools .
( I think the reboot made a difference ,not the upgrade.)
And I could maneuver it from there. That is a great step forward.

But still, it doesn’t react on automation rule.

Thanks for moving it forward.

Edit:

I do see
“Removing current message” for this node in the z-wave log.

Can you post your latest automation? Also, you can try to manually execute the automation? That way, you will know if your issue lies in the trigger or the action part of the automation.

Edit: you can execute by looking it up in the States page, then open the pop up and click Execute. This will skip the trigger and execute the action.

Scripts are coming, until then, yes I could execute through States.
Manually triggering the automations doesn’t work.
Now that also worked , after another reboot…,
No longer 100% sure it didn’t work just prior to reboot.

Edit2: Now the trigger worked! Don’t know why.
Name and alias on automation entry was the same before, and that have been changed,
Thanks all.

Congratulations :slight_smile:

thanks for the help

Great, don’t forget to mark as solved.