I am trying to get the most recent active unacknowledged alarm and display it on a single-line field but I can’t seem to find the data that I look for under the props.
Is there a way to access these info? I also would like to use custom buttons to silence and/or acknowledge it.
This would be because that code only works in 8.1.11, your gateway must be an older version. In older versions the returns are AlarmEvent objects rather than PyAlarmEvent objects, so the code will be a little different. Here’s info about it: AlarmEvent
Pretty sure this would work:
data = system.alarm.queryStatus(state = ["ActiveUnacked", "ActiveAcked"])
for alarm in data:
print alarm.getActiveData().getTimestamp()
print alarm.getLabel()