Rules

What's a rule

A rule is a string that has the format: "if this then that". The this part will be called the condition of the rule and the that part the actions of the rule.

Examples:

The condition of a rule consists of one or more predicates. The predicates can be combined with "and", "or" and can be grouped by parentheses.

for-suffix

A predicate can have a "for" as a suffix like in "music is playing for 5 seconds" or "tv is on for 2 hours". If the predicate has a for-suffix then the rule action is only triggered, when the predicate stays true the given time. Predicates that represent one time events like "10pm" can't have a for-suffix because the condition can never hold.

Predicates

Built in

Switches

Predicate for devices that have a state like switches

Examples:

Presence sensors

Predicates for presence sensors like a motion detector

Examples:

Contact sensors

Variables

Examples:

General Device attributes

Predicates for comparing device attributes like sensor value or other states.

Examples:

Device attribute watchdog

Becomes true if an attribute was not update for a certain time.

Examples:

chron-Plugin

Provided by the cron-plugin

Examples:

mobile-frontend-Plugin

Examples:

sunrise-Plugin

where suntime is "sunrise", "sunset" or any other supported suntime event.

Examples:

Actions

Built in

Switches

Actions for devices that can be turned on or off:

These actions support a for-Suffix to switch the device back to the state before after a certain time.

Examples:

Dimmer

Actions dimmer devices.

Examples:

Shutter/screens

Actions for shutter/screen devices:

These actions support a for-Suffix to stop the shutter/screen from moving after a certain time.

Examples:

Logger

Variables

Examples:

shell-execute-Plugin

mail-Plugin

pushover-Plugin

Development

Take a look at the developer documentation for how it works and how to implement your own predicates and actions.