The Set qualifier latches an action output to TRUE when the step activates, and the output stays TRUE even after the step deactivates.
Every S qualifier must have a matching R qualifier somewhere in your Sequence. Without it, the output will stay TRUE forever.
{GIF:HERE} - Step properties panel showing the action 'Alarm activated' with qualifier dropdown set to 'S' (Set/Stored), no duration field visible since S requires no time parameter
from automation_machine import ActionQualifier
step.add_action("alarm", "Alarm activated", qualifier=ActionQualifier.S)
No duration parameter is needed. Use R to reset the output later.