% for dt in downtimes: object ScheduledDowntime "${dt['name']}" { host_name = "${dt['host']}" author = "${dt['name']}" comment = "${dt['comment']}" fixed = true ranges = { % for d,t in dt['times'].items(): "${d}" = "${t}" % endfor } child_options = "DowntimeTriggeredChildren" } % endfor