Examples
There are some examples of setting widgets up using different fields.
Examples of using count
Present moment
Script execution has been set and it gets the metric date (today’s date) with the value 15.
With setting up the minimum weekly value:
Result = metric value (15) - Period (7 days). The widget will display the date of 8.
Calendar period
Script execution has been set and it gets the metric date (today’s date) with the value of 15 (Thursday).
With setting up the minimum weekly value:
Result = metric value (15) - Period (Monday). The widget will display the date of 12.
Example of using period offset
Website availability is checked with the sensor Ping, and the metric packetsReceived is obtained. Its average value for the previous week can be displayed on the widget by turning the switcher For previous period into the position YES and defining "1" as the offset.
Example of using dictionary
The door open sensor sends the values "1" and "0", which corresponds to the door opening and closing respectively. To display the state of the door in a human-readable form, it is possible to add to the widget the dictionary with the values:
-
0 = the door is closed;
-
1 = the door is opened.
The sensor fixed the door opening and sent the value "1". These data are compared with the dictionary:
The value The door is opened will be displayed on the widget.
Example of using multiline text
With executing an HTTP request, the metric body is returned. The value of the metric is multiline text.
With switching the slider Multiline to the position YES and specifying the font size, the response body will be displayed on the widget fully.