Property class

Property class is a preset template for properties.

Use property values as variables

You can use property values as variables in the following places:

  • State change conditions

  • Actions on state change

  • Notification templates

Variable format

The system uses the following variable format to access properties:

{{parent[`parent name`|class.(name|id)=`name|id`].properties[`name`][`valueIndex`]}}
properties[name] – required.

Usage examples

{{properties[name]}} - Get property value using its name from the current object or a class.

{{parent.properties[name]}} - Get property value using its name from the current object’s first parent, where this property is found.

{{parent[parent name].properties[name]}} - Get property value using its name from the current object’s first parent with the name parent name.

{{parent[class.name=class name].properties[name]}} - Get property value using its name from the current object’s first parent with the class class name.

{{parent[class.id=class id].properties[name]}} - Get property value using its name from the current object’s first parent with the class with ID class id.

If the value is selected from the dictionary that allows you to select multiple options, you can get values by their index, where 0 is the dictionary’s key.

In this case, the variable format would look like this – {{properties[name][value index]}}, where value index is the index of the value you want to get.

Value types

Every property class has a single value type. There is a set list of value types in the system, that cannot be changed by the user. Value types can have additional fields and settings.

System supports the following list of value types:

id Name Description

string

String

Type, that contains a single string. It can also use a mask value – a filter of user input defined as a regular expression. For example, you can restrict user input to numbers only.

integer

Integer

Type, that contains a single integer number.

float

Float

Type, that contains a single floating-point number.

boolean

Boolean

Type, that contains a single "yes"/"no" value.

time

Time

Type that stores time as a Unix timestamp (in milliseconds). System discards the date and used only the time stored in the timestamp.

date

Date

Type that stores time as a Unix timestamp (in milliseconds). System discards the date and used only the time stored in the timestamp.

datetime

Datetime

Type that stores time and date as a Unix timestamp (in milliseconds).

ip

IP

Type that contains a string with IP address. This class is only used in the web interface, server doesn’t perform validation of the value written via REST API.

mac

MAC

Type that contains a string with MAC address. This class is only used in the web interface, server doesn’t perform validation of the value written via REST API.

url

URL

Properties of this type will be displayed as links, that would open in a new tab.

email

EMAIL

Properties of this type will be displayed as links, that would open a default mail app on the device to send an email to the corresponding address.

phone

Phone

Type that contains a string with phone number. This class is only used in the web interface, server doesn’t perform validation of the value written via REST API.

dictionary

Dictionary

Type that contains the value from the dictionary.

In the Source you can specify the dictionary, from which the system will take the values for this property.

The Multiple select toggle determines whether the user can select multiple values from the dictionary.