I gave this a go earlier:
See here: CodePile | Easily Share Piles of Code
But i’m miss understanding how to even make the toggle work right now. Very new to all this.
Once i’d figured out what I was doing with zigbee2mqtt, i was going to try and use this as a starting point for making your script available for other co-ordinators.
//currently failing however
// Edit: Oh wait it turns out it only works if i select entities, and not an area, i see where im at least beginning to go wrong