Complete the code to suppress alarms temporarily.
alarm.suppress([1])The duration=60 sets the alarm suppression for 60 seconds, which is a common temporary suppression time.
Complete the code to shelve an alarm with a reason.
alarm.shelve(reason=[1])Using "maintenance" as the reason clearly indicates the alarm is shelved due to planned work.
Fix the error in the shelving command to include a valid duration.
alarm.shelve(duration=[1])The duration must be a positive integer representing seconds. 120 seconds is valid.
Fill both blanks to suppress and shelve an alarm with a reason and duration.
alarm.suppress([1]) alarm.shelve(reason=[2])
Suppressing for 45 seconds and shelving with reason "maintenance" is a common practice during planned work.
Fill all three blanks to create a dictionary of alarms with their suppression duration and shelving reason.
alarm_settings = { [1]: [2] for alarm in alarms if alarm.status == 'active' and alarm.shelved == [3] }This dictionary maps active alarms (not shelved) by their ID to their suppression duration.