I’d think group turn off is faster. All speculation though.
Edit: I know that searching all the objects is slow. Where as under the hood, the state machine uses hashing or a dictionary to quickly get things based on the entity id. That’s my only reason for my speculation
data_template is looping through all items in the state machine and finding the on group items.
So in essence, the time difference is longer with the data_template/state machine. But in all honesty, thats on the order of milliseconds. Might be longer with slow hardware.
I also find that state keeping is very unreliable. Not because of HA but a device might appear off be actually be on for many many reasons. Better to just send the off signal to the things you want to be off.
The question is does HASS send a command if it’s state tables indicate it’s not required?
For example if a device state in HASS is off; but in reality it’s on; and you send a off command does it get sent? Or does HASS filter based on it’s understanding of state?