Function addRule

  • This function adds rules to the engine

    Parameters

    • name: string
    • execute: RuleExecuteFn
    • triggers: any[]
    • _other: {
          description: string;
      } = ruleDefaultOther
      • description: string

    Returns object

    Example

    addRule(
    "Gedimmte Beleuchtung OG Flur um 19.30 Uhr",
    function () {
    forceOn("Upstairs_Floor_Nightmode");
    },
    [timeTrigger("0 30 19 ? * *")]
    );

Generated using TypeDoc