Using my workaround code in a Kodi lighting control endpoint if anyone wants to look over an example: