Initial work to make it work with 'groups' instead of single lights. Needs more work (not actually working atm)
Groups now working (kinda, it's dimming twice, need to figure out why, probably something stupid but I'm too tired to continue atm :$)