Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- {
- "_id" : "58b5a3494e8c7b0ee6282b39",
- "eo" : {
- "enabled" : true,
- "then" : [
- {
- "text_template" : "[[ezlo.ruleblock.template.block_set_switch]]",
- "blockOptions" : {
- "method" : {
- "args" : {
- "dataitem" : "dataitem",
- "value" : "value"
- },
- "name" : "setSwitchState"
- },
- "actionName" : "ezlo.ruleblock.set"
- },
- "fields" : [
- {
- "name" : "dataitem",
- "type" : "dataitem",
- "value" : "58b5a32a4e8c7b3b138094a2",
- "deviceName" : "Sigma Designs Smart Mini Plug - 2",
- "visibility" : true,
- "instanceTitle" : "[[ezlo.device.fo.set_switch]]"
- },
- {
- "name" : "value",
- "type" : "option",
- "value" : true,
- "options" : [
- {
- "value" : false,
- "text" : "[[ezlo.ruleblock.off]]"
- },
- {
- "value" : true,
- "text" : "[[ezlo.ruleblock.on]]"
- }
- ],
- "visibility" : true,
- "renderer" : "for (var option in options) { if(options[option].value === value){return options[option].text}}"
- }
- ],
- "name" : "[[ezlo.ruleblock.set_switch]]",
- "group" : "Actuators",
- "trigger" : null,
- "blockType" : "then"
- }
- ],
- "homeModes" : null,
- "name" : "test",
- "group_id" : null,
- "is_group" : false,
- "parent_id" : "58b5a24c4e8c7b0ee6282b34",
- "when" : [
- {
- "text_template" : "[[ezlo.ruleblock.template.block_time_is]]",
- "blockOptions" : {
- "method" : {
- "args" : {
- "month" : null,
- "time" : "time",
- "weekday" : null,
- "year" : null,
- "day" : null
- },
- "name" : "isDate"
- },
- "original_condition_type" : "at",
- "condition_type" : "at",
- "trigger_object" : {
- "month" : null,
- "time" : "time",
- "weekday" : null,
- "year" : null,
- "day" : null
- }
- },
- "fields" : [
- {
- "name" : "time",
- "type" : "time",
- "value" : "19:05",
- "visibility" : true,
- "renderer" : "var hms = value.split(':'), h = +hms[0], suffix = (h < 12) ? '[[ezlo.ruleblock.am]]' : '[[ezlo.ruleblock.pm]]'; hms[0] = h % 12 || 12; if(hms[0].length == 1){hms[0] = '0'+hms[0]} if(hms[1].length == 1){hms[1] = '0'+hms[1]} return hms.join(':') + ' ' + suffix"
- }
- ],
- "name" : "[[ezlo.ruleblock.time_is]]",
- "group" : "Time",
- "trigger" : true,
- "blockType" : "when"
- }
- ]
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement