In the script where the group is defined. #groupname on becomes #groupname off when disabled and vice-versa. But you should just use $group() to get that information.