There is already a community-contributed YoLink integration that probably does what you need:
The only "deficiency" is that it is cloud-based, connecting HE to your YoLink devices through an API running on YoLink's servers, so is possibly a little slower than desired and obviously dependent on their servers and a functioning internet connection. In contrast, Hubitat prefers to officially support solutions that run entirely on your local LAN, but YoLink has not yet released an API that would allow us to connect directly to our YoLink hubs.