How to read and Set the logic variables with HomeyScript?

From this post onwards, there’s some discussion on how to set Logic variables.