To prepare the chicken rub, mix lemon zest, garlic, thyme, salt, and pepper in a small bowl. Apply the rub evenly on the chicken, including under the skin. Cover and refrigerate for at least an hour.
In a small saucepan, combine all sauce ingredients except the blueberries and onions, which will be added later. Heat the mixture over medium heat, allowing it to simmer for 5 minutes. Turn off the heat and let the saucepan rest for 30 minutes to infuse the flavors fully. Strain the liquid onto the blueberries, discarding the spices.
Add the blueberries and liquid back into the pan. Turn the heat to medium and cook for 5-10 minutes until the blueberries begin to soften.
Turn off the heat and stir in the thinly sliced onions. Allow the sauce to rest at room temperature until ready to serve.
Preheat a grill to medium-high heat (400°F). Lightly drizzle olive oil over the chicken to prevent sticking. Place the chicken skin-side down on the grill. Lower the heat to medium, cover the grill, and cook the chicken, turning once, until it's no longer pink in the thickest part (approximately 30 minutes, depending on the size).
Allow the chicken to rest for 5 minutes before serving with the blueberry sauce.