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

SubDevice.AddAction (without a function)

Add ab action (used in macros and rules). Parameters in brackets are not obligatory

Синтаксис

SubDevice.AddAction(Name, ScriptCall, Channel, [Default], [SmartID], [AdvancedField], [Hidden])

Название Пример Описание
Name "Power on" type: String
имя действия
ScriptCall true type: Boolean
a feature that an action works via a function. Use true
Channel "Channel 1" type: String
имя канала
Default "1" type: String
A value that is set in the channel
SmartID type: Number
This parameter is not available at the moment, set null
AdvancedField {Name, Type, ...} type: Object, Array
It is used to work with complicated actions. If AdvancedField is used, set null in Default parameter.

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

На выходе

{{{output}}}


Пример

{{{JSsample}}}

{{{attentions}}}