Basic Rules
We are pleased to introduce a new automation app: Basic Rules. Basic Rule offers an easy to understand app for those just getting started with home automation. At the same time it offers features that experienced users will find handy.
Each Basic Rule you create takes this form: When X Do Y. When some specific event happens in your system perform an action. The types of events that can trigger a Basic Rule include these:
- Time of day, with Sunrise and Sunset options
- Motion, Contact, Presence, Acceleration or Vibration sensors
- Water - Leak, Smoke or Carbon Monoxide detectors
- Temperature, Humidity or Illuminance sensors
- Switch on/off, Button pressed, or Mode changes
The types of actions that a Basic Rule can perform in response include these:
- Turn switches on/off/toggle, set dimmer level, set color or color temperature
- Lock/unlock locks, open/close valves or push a button
- Send notifications or speak messages, set the Mode
In order to keep things easy Basic Rule will only offer choices for triggers (X) and actions (Y) for the actual devices you have installed in your Hubitat Elevation system.
Here is an example of a simple Basic Rule:
Easy Automations
Often just having a device trigger an action as shown above isn't quite what is needed. Perhaps we want a message sent if a door has opened and been left open. Basic Rule makes this sort of thing very easy:
The best way to learn what Basic Rule can do is to play around with it, see what you can create!
More Devices for X
Throughout Basic Rule allows you to select multiple devices for When a .... This can be very handy when a number of things might be needed to cause an action. Taking our example just above, but adding two or more contact sensors makes for a more robust rule to let us know a door has been left open. Plus, Basic Rule can even tell us which one was left open!
In each case with multiple devices, Basic Rule offers obvious choices, but not all choices. Needing more choices would push you into a more complex app, such as Rule Machine. So Basic Rule offers these hopefully obvious multiple device options:
- Any motion sensor active; All motion sensors inactive
- Any contact sensor open; All contact sensors closed
- Any vibration sensor active; All vibration sensors inactive
- Any presence sensor arrives; All presence sensors leave
- Any switch turns on; All switches turn off
For temperature, humidity and illuminance sensors each will trigger if any sensor is greater than or less than the selected value.
Here is the doors left open rule with multiple contact sensors:
Note the %device% in the message. This indicates to fill in the name of the device that last triggered the Basic Rule. You can also use %value% to fill in the last event value (e.g. the last temperature if the trigger was temperature sensor below 32°), %date% and %time% to fill in when the event occurred.
More Actions for Y
Because you may want more than one thing to happen when a Basic Rule runs, you can easily add more actions. Any action you have in Basic Rule can be changed by directly editing it, or removed by hitting the Delete button. Building on the Any Door Left Open rule from above, we can add another action quite easily. Notice that we get a summary of the Basic Rule at the top of the page:
There is an action called Wait that simply introduces some delay in the subsequent actions being run for a selected number of minutes.
Wait Until ...
Next to the "Add another action" button is "Add Wait until ..." button. This option opens up the possibility of the rule waiting for another event before proceeding to run additional actions. With this option a rule can both turns on the lights in response to an event, and also turn them off later when another event occurs. Below is a modification of the Doors Open rule that turns off the lights after all of the doors have closed. Both Wait for minutes and Wait Until are cancelled if the rule is triggered again by it's primary trigger.
Restrictions
Suppose we only want the Any Door Left Open rule to run at night time. We can add a Restriction that determines those time or circumstances in which the Basic Rule will run.
The available Restrictions include:
- Only between two times
- Only on certain days of the week
- Only when mode is one of a selected list of mode
- Only when illuminance is greater or less than a selected value
- Only when not disabled by a switch being on or off
When a Basic Rule is restricted, Restricted in red will appear next to the rules name, both in the app and on the Apps list.
There are options to change the Basic Rule name if you don't like the automatically created name, and to turn on logging to see each step the rule takes when it runs in Logs.