Turn on light trough applescript

Hi

Is it possible to turn on a light I have in HA by running an applescript.
I found this thread on how to run a HA script trough SSH. Do I have to put all the HA-commands in a script first, can’t I simply put all commands in my applescript?

Robert

Can you call a post command from an applescript? If so you are in business.