Files
HeatGuard/internal/risk/thresholds.go
vikingowl 21154d5d7f feat: add heating support with heat pump modeling and cold risk detection
Model heating mode when rooms have net heat loss in cold weather (<10°C).
AC units with heat pump capability (canHeat) provide heating capacity,
with the same 20% headroom threshold used for cooling. Adds cold risk
detection, cold-weather actions, and full frontend support including
heating mode timeline colors, room budget heating display, and i18n.
2026-02-11 00:00:43 +01:00

23 lines
812 B
Go

package risk
// Thresholds holds configurable temperature thresholds for risk analysis.
type Thresholds struct {
HotDayC float64 // daytime temp considered "hot" (default 30)
VeryHotDayC float64 // daytime temp considered "very hot" (default 35)
ExtremeDayC float64 // extreme heat (default 40)
PoorNightCoolingC float64 // night temp above which cooling is poor (default 20)
ComfortMaxC float64 // max indoor comfort temp (default 26)
ColdDayC float64 // temp at or below which cold risk is flagged (default 0)
}
// DefaultThresholds returns the default temperature thresholds.
func DefaultThresholds() Thresholds {
return Thresholds{
HotDayC: 30,
VeryHotDayC: 35,
ExtremeDayC: 40,
PoorNightCoolingC: 20,
ComfortMaxC: 26,
}
}