I have a gateway tag change script that is looking at the change of an alarm tag, I want to make it execute only when the alarm is true and not when the alarm is false. Here is my script but for some reason it is still executing when the alarms goes true and when the alarms goes back to false.
[color=#0040BF]Alarm = system.tag.getTagValue(“system1/project1/HTST_1/ALARMS/MILK_TOO_HOT”)
curHour = system.tag.getTagValue(“curTime”)
Temp = system.tag.getTagValue(“system1/project1/HTST_1/Analog/TT130177_SCL”)
body="Pasturized Milk Temp @ " + str(Temp)+ “°F for over 10 min”
if curHour > 9 :
recipients = [“firstname.lastname@example.org”,“email@example.com”]
recipients = [“firstname.lastname@example.org”]
What amd I doing wrong?