{{define "history"}}

{{index .DeviceModel 0}}

Number of times unplugged: {{index .Count 0}}

{{range $key, $value := index .UnplugSummaries 0}} {{.LevelDrop}} pct drop @ {{printf "%.2f" .LevelDropPerHour}} %/hr over {{.Duration}}
({{.SummaryStart}} - {{.SummaryEnd}})
{{end}}
{{range $key, $value := index .UnplugSummaries 0}} {{end}}

{{index .DeviceModel 1}}

Number of times unplugged: {{index .Count 1}}

{{range $key, $value := index .UnplugSummaries 1}} {{.LevelDrop}} pct drop @ {{printf "%.2f" .LevelDropPerHour}} %/hr over {{.Duration}}
({{.SummaryStart}} - {{.SummaryEnd}})
{{end}}
{{range $key, $value := index .UnplugSummaries 1}} {{end}} {{end}}