Hey everyone,
Just wanted to add this here as it bit me after we upgraded from 7.9 to 8.1.
On 7.9 we could run the following script to remove an alarm from a tag
tagPath = 'Path/To/Tag/MyTag'
alarmName = 'Alarm'
system.tag.editAlarmConfig([tagPath], {alarmName: None})
On 8.1 the code runs without error, but doesn't delete the alarm. I rewrote the script using system.tag.configure
to achieve a similar result. Not as pretty, but it works
basePath = 'Path/To/Tag'
tagName = 'MyTag'
alarmName = 'Alarm'
alarms = [config for config in system.tag.getConfiguration(tagPath, True)[0]['alarms'] if config['name'] != alarmName]
system.tag.configure(basePath, [{'name': tagName, 'alarms': alarms}], 'o')
I tried for a bit to see if i could delete it without grabbing all alarms and excluding the one we don't want but gave up and went with this approch as I didn't want to spend too much time on it.
Hope this helps anyone in the future