Automationphat relay behaviour


I have control of the relay, but when I issue a .on() command, it will only activate or stay open for as long as the sleep(x) function after it.
I cannot get it to change to just be on until I tell it to close, ie no sleep function after.
I want to run one script to turn on the relay, such as:

import automationhat

and another script to turn it off:

import automationhat

I have also tried to use the RPi.GPIO instead of the automationhat library, but it seems the relay will revert to “off” as soon as the script has completed
My other relay boards do not behave like this, they will stay in the given state until it is commanded to change.
Is this normal for the Automationphat?


I still have not figured out why the state is defaulting to off when the script finishes. Does the Pi Zero W GPIO not stay high until it gets a command to go low?


I’m sorry if I have missed something obvious here, but it would be useful to know if it is possible for the relay to hold its state after a script closes.