quiet-hours: configurable time-window schedule
Adds QuietHours config section (start/end as HH:MM local time). The loop's gatherer checks the window each tick: if now falls within [start, end), the State.QuietHours flag is set to true regardless of the config fact (which the voice toggle writes independently). Both sources activate quiet — schedule AND toggle. Handles midnight-crossing windows (23:00-08:00). The gate already reads State.QuietHours for care nudge suppression — no gate change needed.
This commit is contained in:
@@ -78,6 +78,9 @@ func run(args []string) error {
|
||||
|
||||
rules := loop.DefaultRules()
|
||||
gatherer := loop.NewGatherer(st, rules)
|
||||
if cfg.QuietHours != nil {
|
||||
gatherer.SetQuietHours(cfg.QuietHours.Start, cfg.QuietHours.End)
|
||||
}
|
||||
|
||||
// ----- phraser (LLM-backed when configured, Stub floor otherwise) -----
|
||||
var phr phraser.Phraser = phraser.NewStub()
|
||||
|
||||
Reference in New Issue
Block a user