For an overview of the Rules tab in UrsaLeo Cloud, start here. This document assumes you're well versed in rule conditions and will illustrate the options in creating a message template.
Before we send an email, webhook, or SMS, we first need to create a message to be sent. We do this by creating a new template by clicking the + sign to the right of the With Template box. Note: There is no functional difference between the two + signs. They both create a new template to add to the overall template list. When templates are created, you may click the notepad icon next to With Template to edit any existing template.
Blank template form appears after click + next to With Template.
Here the template can be named, a subject line that will appear in the email / SMS / webhook added, and the body of the text entered.
Using Variables in the Template
The default sensor names in the UrsaLeo Cloud are temp, humidity, pressure, als (ambient light strength), uv (ultra violet), TVOC (total volatile organic compounds) and eco2 (CO2 level). You can use these names in your template to denote a particular sensor:
|$urtj00.temp.value$||Inserts temperature (calibrated) value for the device with ID urtj00|
|$urtj00.temp.raw$||Inserts temperature (uncalibrated) value for the device with ID urtj00|
|$urtj00.temp.date$||Will put in the date and time that the temperature reading was timestamped with|
|$ruleName$||Will put in the name of the fired rule|
You can also use HTML formatting in your message template:
|<b> Bold text </b>||HTML bold text|
|<i> Italicized text</i>||HTML italicized text|
|<a href="mailto:firstname.lastname@example.org"> Name </a>||Hyperlink HTML|
Other HTML codes can be used for subscript, superscript, strikethrough, underline, and highlight.