Issue with custom probe

Good day,

I need some help setting up a probe for a alarm.

Onsite we have a device that monitors voltage and if the ac is on or off.

Then i use the dude to send notification to telegram if ac goes down.

Now i try to to the exact same with the alarm, snmp will return value 0 or 1

0 = Alarm off and 1 = Alarm on

First i create a Function called NPM_Alarm

code = oid(“1.3.6.1.4.1.45501.1.3.9.0”)]

Then Probe NPM_Alarm

Available = NPM_Alarm()

Error= if(NPM_Alarm()=1, “Alarm ON”,“Alarm OFF”)

Valuie = NPM_Alarm()

Then last i create the service, issue is the service never shows up, only the down problem in dude changes from Alarm OFF to alarm ON, any suggestions