Материал из Module developer
Перейти к: навигация, поиск

SubDevice.AddEvent (works without a function )

Add an event. Events are an obligatory part of creating rules. This event works without a function

Синтаксис

SubDevice.AddEvent(Name, Path, ScriptCall, Compare, [Default], [AdvancedField])

Название Пример Описание
Name "Temperature drops below..." type: String
Action name
Path "Drivers.Nest.CurrentTemperature" type: String
Full path to a channel, driver feedback channel or token. It is subscription to keeping track of changes
ScriptCall false type: Boolean
A feature of working via a function. In this realization set false
Compare type: String
Comparison operator as a string
Default "23" type: String
Default value
AdvancedField type: Object, Array
It is used to work with complicated actions. If AdvancedField is used, set null in Default parameter.

One object or a object array can be sent in AdvancedField.

На выходе

{{{output}}}


Пример

{{{JSsample}}}

{{{attentions}}}