Warning
Make sure pilight is not running before editing your configuration or else all changes will be lost.
Since pilight version 6, eventing has been introduced. To use events, you need to first define rules inside the pilight configuration.
The basic pilight rule structure for the configuration looks like this:
1 2 3 4 5 6 7 8 | {
"rules": {
"rule_name": {
"rule": "IF switch.state == on THEN switch DEVICE switch.state TO off",
"active": 1
}
}
}
|
As you can see, a rules object consists of various elements:
You can of course define as many rules as you like.