feat: Introduce rule configuration from the status dashboard, allowing storedDuration editing for the water button rule and improving its timer handling.
This commit is contained in:
@@ -218,6 +218,17 @@ export async function getRulesStatus() {
|
||||
return statuses;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set config on a specific rule
|
||||
*/
|
||||
export function setRuleConfig(ruleName, key, value) {
|
||||
const rule = rules.find(r => r._filename === ruleName);
|
||||
if (rule && typeof rule.setConfig === 'function') {
|
||||
return rule.setConfig(key, value);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Watch rules directory for changes and auto-reload
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user