I noticed recently that my presence based automation for turning off all the lights and switches in my house wasn’t working. A quick search revealed that it may be to do with the depreciation of groups in the last update (.105 I think.)
Can someone confirm if it’s true that"group.all_devices", “group.all_lights”, and “group.all_devices” are no longer valid? If so, is there a function to replace them?
Excellent, this helps. Now for the second part of my problem. I have a presence based automation, that turns everything off after a period of time. Is there a better way to recreate this now as group.all_devices has been depreciated?
Code as it now stands:
- id: '1537562738209'
alias: Away
trigger:
- entity_id: group.all_devices
from: home
platform: state
to: not_home
condition: []
action:
- data:
entity_id: all
service: light.turn_off
- data:
entity_id: all
service: switch.turn_off
If you have lights of the same type there might be the option to create a group that includes all lights with the native method of control and expose that group as an individual light to Home Assistant (thus the turning off/on commands will be instantly applied case you have several lights that you might want to change in the same time).
It turns out, I had already done this. I don’t know when, or why, but I’m not complaining. I haven’t confirmed that it’s working yet, but I don’t see why it wouldn’t. Thanks a million
That piece of automation code switches off every light and switch entity. Specially the last one is quite dangerous. Know what code does before running it is really key here.