Don't have a current need but

You may want to read the following, as it is very similar to your question, although the below example involves switching Hubitat hub. Much of the theory regarding devices remains the same.

3 Likes