Advertisement
Guest User

Untitled

a guest
Feb 28th, 2017
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.88 KB | None | 0 0
  1. {
  2. "_id" : "58b5a3494e8c7b0ee6282b39",
  3. "eo" : {
  4. "enabled" : true,
  5. "then" : [
  6. {
  7. "text_template" : "[[ezlo.ruleblock.template.block_set_switch]]",
  8. "blockOptions" : {
  9. "method" : {
  10. "args" : {
  11. "dataitem" : "dataitem",
  12. "value" : "value"
  13. },
  14. "name" : "setSwitchState"
  15. },
  16. "actionName" : "ezlo.ruleblock.set"
  17. },
  18. "fields" : [
  19. {
  20. "name" : "dataitem",
  21. "type" : "dataitem",
  22. "value" : "58b5a32a4e8c7b3b138094a2",
  23. "deviceName" : "Sigma Designs Smart Mini Plug - 2",
  24. "visibility" : true,
  25. "instanceTitle" : "[[ezlo.device.fo.set_switch]]"
  26. },
  27. {
  28. "name" : "value",
  29. "type" : "option",
  30. "value" : true,
  31. "options" : [
  32. {
  33. "value" : false,
  34. "text" : "[[ezlo.ruleblock.off]]"
  35. },
  36. {
  37. "value" : true,
  38. "text" : "[[ezlo.ruleblock.on]]"
  39. }
  40. ],
  41. "visibility" : true,
  42. "renderer" : "for (var option in options) { if(options[option].value === value){return options[option].text}}"
  43. }
  44. ],
  45. "name" : "[[ezlo.ruleblock.set_switch]]",
  46. "group" : "Actuators",
  47. "trigger" : null,
  48. "blockType" : "then"
  49. }
  50. ],
  51. "homeModes" : null,
  52. "name" : "test",
  53. "group_id" : null,
  54. "is_group" : false,
  55. "parent_id" : "58b5a24c4e8c7b0ee6282b34",
  56. "when" : [
  57. {
  58. "text_template" : "[[ezlo.ruleblock.template.block_time_is]]",
  59. "blockOptions" : {
  60. "method" : {
  61. "args" : {
  62. "month" : null,
  63. "time" : "time",
  64. "weekday" : null,
  65. "year" : null,
  66. "day" : null
  67. },
  68. "name" : "isDate"
  69. },
  70. "original_condition_type" : "at",
  71. "condition_type" : "at",
  72. "trigger_object" : {
  73. "month" : null,
  74. "time" : "time",
  75. "weekday" : null,
  76. "year" : null,
  77. "day" : null
  78. }
  79. },
  80. "fields" : [
  81. {
  82. "name" : "time",
  83. "type" : "time",
  84. "value" : "19:05",
  85. "visibility" : true,
  86. "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"
  87. }
  88. ],
  89. "name" : "[[ezlo.ruleblock.time_is]]",
  90. "group" : "Time",
  91. "trigger" : true,
  92. "blockType" : "when"
  93. }
  94. ]
  95. }
  96. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement