namespace BoilerMonitor.Models; public static class BoilerMonitorConsts { public const int DefaultPollIntervalSeconds = 30; /// /// Power threshold in watts below which the boiler is considered to have finished heating (water ready). /// Also used as the default threshold above which the boiler is considered actively heating. /// public const double DefaultHeatingPowerThresholdWatts = 5.0; /// /// Number of consecutive below-threshold power readings required before /// declaring water as ready. Prevents false positives from transient sensor glitches. /// At 30s poll interval, a value of 2 means 60s of confirmed low power. /// public const int ConsecutiveReadingsRequired = 2; public const string ShowerStateEntityId = "sensor.showermonitor_state"; public const string ShowerActiveState = "Active"; /// /// Minimum interval between "hot water is ready" push notifications. /// Prevents notification spam when power readings fluctuate around the heating threshold. /// public static readonly TimeSpan WaterReadyNotificationCooldown = TimeSpan.FromHours(1); public const int MinPollIntervalSeconds = 5; public const int MaxPollIntervalSeconds = 300; public const int PollIntervalStepSeconds = 5; public const double MinHeatingThresholdWatts = 1.0; public const double MaxHeatingThresholdWatts = 100.0; public const double HeatingThresholdStepWatts = 0.5; public const string ConfigPowerEntityId = "text.boilermonitor_config_power_entity_id"; public const string ConfigSwitchEntityId = "text.boilermonitor_config_switch_entity_id"; public const string ConfigPollIntervalEntityId = "number.boilermonitor_config_poll_interval"; public const string ConfigHeatingThresholdEntityId = "number.boilermonitor_config_heating_threshold"; public const string CleanupButtonEntityId = "button.boilermonitor_cleanup"; public const string StatusEntityId = "sensor.boilermonitor_status"; public const string WaterReadyEntityId = "sensor.boilermonitor_water_ready"; public const string SkipPriceCapEntityId = "switch.boilermonitor_skip_price_cap"; public const string TodayRuntimeEntityId = "sensor.boilermonitor_today_runtime"; public const string RemainingTimeEntityId = "sensor.boilermonitor_remaining_time"; public const string BudgetPercentageEntityId = "sensor.boilermonitor_budget_percentage"; public const string BudgetExhaustedEntityId = "binary_sensor.boilermonitor_budget_exhausted"; public const string SessionCountEntityId = "sensor.boilermonitor_session_count"; public const string BudgetOverrideEntityId = "switch.boilermonitor_budget_override"; /// /// When on, the daemon may call the configured boiler switch per price/budget/water-ready logic. /// When off, monitoring continues but automatic turn_on/turn_off calls are suppressed (manual control). /// public const string AutoManagementEntityId = "switch.boilermonitor_auto_management"; public const string NordPoolCheapestIntervalsEntityId = "sensor.nordpool_cheapest_intervals"; public const string BoilerDailyHoursEntityId = "input_number.boiler_daily_hours"; public const string BoilerPriceCapEntityId = "input_number.boiler_price_cap"; public const string BoilerReadyByEntityId = "input_datetime.boiler_ready_by"; public const string StatusConfigured = "configured"; public const string StatusAwaitingConfiguration = "awaiting_configuration"; public const string StatusCleanedUp = "cleaned_up"; public const string SwitchOnState = "on"; public const string SwitchOffState = "off"; public const string DeviceIdentifier = "boiler_monitor"; public const string DeviceName = "Boiler Monitor"; public const string DeviceManufacturer = "HomeAssistant App Daemon"; }