{{if .Flash}}
{{.Flash}}
{{end}}

Setup

Active profile: {{if .Profile}}{{.Profile.Name}}{{else}}(none){{end}}

Profiles Rooms Devices Occupants AC Units Toggles Forecast
{{template "profiles" .}} {{template "rooms" .}} {{template "devices" .}} {{template "occupants" .}} {{template "ac_units" .}} {{template "toggles" .}} {{template "forecast" .}}
{{define "profiles"}}

Profiles

{{if .Profiles}}
{{range .Profiles}} {{end}}
Name Latitude Longitude Timezone
{{.Name}} {{printf "%.4f" .Latitude}} {{printf "%.4f" .Longitude}} {{.Timezone}}
{{else}}

No profiles yet.

{{end}}

Add Profile

{{end}} {{define "rooms"}}

Rooms

{{if not .Profile}}

Create a profile first.

{{else}} {{if .Rooms}}
{{range .Rooms}} {{end}}
Name Area (m²) Floor Orientation Ceiling (m)
{{.Name}} {{printf "%.1f" .AreaSqm}} {{.Floor}} {{.Orientation}} {{printf "%.2f" .CeilingHeightM}}
{{else}}

No rooms yet.

{{end}}

Add Room

{{end}}
{{end}} {{define "devices"}}

Devices

{{if not .Profile}}

Create a profile first.

{{else}} {{if .Devices}}
{{range .Devices}} {{end}}
Name Type Room Idle (W) Typical (W) Peak (W) Duty
{{.Name}} {{.DeviceType}} {{.RoomID}} {{printf "%.0f" .WattsIdle}} {{printf "%.0f" .WattsTypical}} {{printf "%.0f" .WattsPeak}} {{printf "%.0f%%" (mul .DutyCycle 100)}}
{{else}}

No devices yet.

{{end}} {{if .Rooms}}

Add Device

{{else}}

Add a room first to create devices.

{{end}} {{end}}
{{end}} {{define "occupants"}}

Occupants

{{if not .Profile}}

Create a profile first.

{{else}} {{if .Occupants}}
{{range .Occupants}} {{end}}
Room Count Activity Vulnerable
{{.RoomID}} {{.Count}} {{.ActivityLevel}} {{if .Vulnerable}}Yes{{else}}No{{end}}
{{else}}

No occupants yet.

{{end}} {{if .Rooms}}

Add Occupant

{{else}}

Add a room first to create occupants.

{{end}} {{end}}
{{end}} {{define "ac_units"}}

AC Units

{{if not .Profile}}

Create a profile first.

{{else}} {{if .ACUnits}}
{{range .ACUnits}} {{$acID := .ID}}
{{.Name}} {{.ACType}} — {{printf "%.0f" .CapacityBTU}} BTU/h — EER {{printf "%.1f" .EfficiencyEER}} {{if .HasDehumidify}}Dehumidify{{end}}
{{if $.Rooms}}
Assign to:
{{if .AssignedRoomIDs}}
{{range .AssignedRoomIDs}}
{{end}}
{{end}} {{end}}
{{end}}
{{else}}

No AC units yet.

{{end}}

Add AC Unit

{{end}}
{{end}} {{define "toggles"}}

Scenario Toggles

{{if not .Profile}}

Create a profile first.

{{else}}
{{range $name, $active := .Toggles}}
{{$name}}
{{end}}
{{end}}
{{end}} {{define "forecast"}}

Forecast

{{if not .Profile}}

Create a profile first.

{{else}}

Last fetched: {{if .LastFetch}}{{.LastFetch}}{{else}}never{{end}}

{{end}}
{{end}}