make use of the presence functions that AD has. (everyone_home(), noone_home(), anyone_home() )
and the presence constraint functions
with get_state you can get a dict with all lights or all switches, which then can be used to turn off.
make use of the presence functions that AD has. (everyone_home(), noone_home(), anyone_home() )
and the presence constraint functions
with get_state you can get a dict with all lights or all switches, which then can be used to turn off.