Facebook
From Sole Octupus, 4 Years ago, written in Plain Text.
This paste is a reply to AM from Nick - view diff
Embed
Download Paste or View Raw
Hits: 320
  1. [
  2.     {
  3.         "id": "f2b6ddd6.25351",
  4.         "type": "function",
  5.         "z": "94604175.00524",
  6.         "name": "Increment brightness",
  7.         "func": "brightness = (context.get("brightness") || 1) + 1;nmsg.brightness = Math.min(255, brightness);nnode.status({text: msg.brightness});ncontext.set("brightness", brightness);nreturn msg;",
  8.         "outputs": 1,
  9.         "noerr": 0,
  10.         "x": 520,
  11.         "y": 80,
  12.         "wires": [
  13.             [
  14.                 "b83f6b7b.666e08",
  15.                 "671c491e.53fc08",
  16.                 "dd0dbd98.d454a",
  17.                 "604605d9.b5076c"
  18.             ]
  19.         ]
  20.     },
  21.     {
  22.         "id": "b83f6b7b.666e08",
  23.         "type": "debug",
  24.         "z": "94604175.00524",
  25.         "name": "",
  26.         "active": true,
  27.         "tosidebar": true,
  28.         "console": false,
  29.         "tostatus": false,
  30.         "complete": "brightness",
  31.         "targetType": "msg",
  32.         "x": 720,
  33.         "y": 20,
  34.         "wires": []
  35.     },
  36.     {
  37.         "id": "4406ac1d.da7904",
  38.         "type": "delay",
  39.         "z": "94604175.00524",
  40.         "name": "delay",
  41.         "pauseType": "delayv",
  42.         "timeout": "5",
  43.         "timeoutUnits": "seconds",
  44.         "rate": "1",
  45.         "nbRateUnits": "2",
  46.         "rateUnits": "second",
  47.         "randomFirst": "1",
  48.         "randomLast": "5",
  49.         "randomUnits": "seconds",
  50.         "drop": true,
  51.         "x": 1190,
  52.         "y": 520,
  53.         "wires": [
  54.             []
  55.         ]
  56.     },
  57.     {
  58.         "id": "43e71f80.7965",
  59.         "type": "change",
  60.         "z": "94604175.00524",
  61.         "name": "reset",
  62.         "rules": [
  63.             {
  64.                 "t": "set",
  65.                 "p": "reset",
  66.                 "pt": "msg",
  67.                 "to": "true",
  68.                 "tot": "str"
  69.             }
  70.         ],
  71.         "action": "",
  72.         "property": "",
  73.         "from": "",
  74.         "to": "",
  75.         "reg": false,
  76.         "x": 250,
  77.         "y": 520,
  78.         "wires": [
  79.             [
  80.                 "4406ac1d.da7904"
  81.             ]
  82.         ]
  83.     },
  84.     {
  85.         "id": "6556a04.635f96",
  86.         "type": "inject",
  87.         "z": "94604175.00524",
  88.         "name": "STOP",
  89.         "topic": "",
  90.         "payload": "",
  91.         "payloadType": "date",
  92.         "repeat": "",
  93.         "crontab": "",
  94.         "once": false,
  95.         "onceDelay": 0.1,
  96.         "x": 110,
  97.         "y": 240,
  98.         "wires": [
  99.             [
  100.                 "43e71f80.7965",
  101.                 "f2b6ddd6.25351",
  102.                 "e2fecdcf.9a5ec"
  103.             ]
  104.         ]
  105.     },
  106.     {
  107.         "id": "6b7d413a.b9817",
  108.         "type": "looptimer",
  109.         "z": "94604175.00524",
  110.         "duration": "2",
  111.         "units": "Minute",
  112.         "maxloops": "255",
  113.         "maxtimeout": "7",
  114.         "maxtimeoutunits": "Hour",
  115.         "name": "2min 200x 6.33 Hours",
  116.         "x": 280,
  117.         "y": 40,
  118.         "wires": [
  119.             [
  120.                 "f2b6ddd6.25351",
  121.                 "e2fecdcf.9a5ec"
  122.             ],
  123.             []
  124.         ]
  125.     },
  126.     {
  127.         "id": "b8d63647.695518",
  128.         "type": "api-call-service",
  129.         "z": "94604175.00524",
  130.         "name": "Living  Room | Overhead",
  131.         "server": "2451a35b.d6669c",
  132.         "version": "1",
  133.         "service_domain": "homeassistant",
  134.         "service": "turn_on",
  135.         "entityId": "light.caseta_r_wireless_in_wall_dimmer",
  136.         "data": "{"brightness":"{{brightness}}"}",
  137.         "dataType": "json",
  138.         "mergecontext": "",
  139.         "output_location": "",
  140.         "output_location_type": "none",
  141.         "mustacheAltTags": false,
  142.         "x": 910,
  143.         "y": 480,
  144.         "wires": [
  145.             [
  146.                 "4406ac1d.da7904"
  147.             ]
  148.         ]
  149.     },
  150.     {
  151.         "id": "928d0136.507c6",
  152.         "type": "api-call-service",
  153.         "z": "94604175.00524",
  154.         "name": "Foyer | Overhead",
  155.         "server": "2451a35b.d6669c",
  156.         "service_domain": "homeassistant",
  157.         "service": "turn_on",
  158.         "data": "{"entity_id":"light.caseta_r_wireless_in_wall_dimmer_2","brightness":"{{brightness}}"}",
  159.         "mergecontext": "",
  160.         "output_location": "",
  161.         "output_location_type": "none",
  162.         "mustacheAltTags": false,
  163.         "x": 890,
  164.         "y": 160,
  165.         "wires": [
  166.             [
  167.                 "4406ac1d.da7904"
  168.             ]
  169.         ]
  170.     },
  171.     {
  172.         "id": "671c491e.53fc08",
  173.         "type": "api-call-service",
  174.         "z": "94604175.00524",
  175.         "name": "Dining Room | Overhead",
  176.         "server": "2451a35b.d6669c",
  177.         "service_domain": "homeassistant",
  178.         "service": "turn_on",
  179.         "data": "{"entity_id":"light.caseta_r_wireless_in_wall_dimmer_4","brightness":"{{brightness}}"}",
  180.         "mergecontext": "",
  181.         "output_location": "",
  182.         "output_location_type": "none",
  183.         "mustacheAltTags": false,
  184.         "x": 910,
  185.         "y": 240,
  186.         "wires": [
  187.             [
  188.                 "4406ac1d.da7904"
  189.             ]
  190.         ]
  191.     },
  192.     {
  193.         "id": "76494d08.3ab6a4",
  194.         "type": "api-call-service",
  195.         "z": "94604175.00524",
  196.         "name": "Hallway | Overhead",
  197.         "server": "2451a35b.d6669c",
  198.         "service_domain": "homeassistant",
  199.         "service": "turn_on",
  200.         "data": "{"entity_id":"light.caseta_r_wireless_in_wall_dimmer_5","brightness":"{{brightness}}"}",
  201.         "mergecontext": "",
  202.         "output_location": "",
  203.         "output_location_type": "none",
  204.         "mustacheAltTags": false,
  205.         "x": 890,
  206.         "y": 400,
  207.         "wires": [
  208.             [
  209.                 "4406ac1d.da7904"
  210.             ]
  211.         ]
  212.     },
  213.     {
  214.         "id": "dd0dbd98.d454a",
  215.         "type": "api-call-service",
  216.         "z": "94604175.00524",
  217.         "name": "Bathroom | Overhead",
  218.         "server": "2451a35b.d6669c",
  219.         "service_domain": "homeassistant",
  220.         "service": "turn_on",
  221.         "data": "{"entity_id":"light.caseta_r_wireless_in_wall_dimmer_6","brightness":"{{brightness}}"}",
  222.         "mergecontext": "",
  223.         "output_location": "",
  224.         "output_location_type": "none",
  225.         "mustacheAltTags": false,
  226.         "x": 900,
  227.         "y": 320,
  228.         "wires": [
  229.             [
  230.                 "4406ac1d.da7904"
  231.             ]
  232.         ]
  233.     },
  234.     {
  235.         "id": "136aaf9.b6bd45",
  236.         "type": "inject",
  237.         "z": "94604175.00524",
  238.         "name": "6am",
  239.         "topic": "",
  240.         "payload": "",
  241.         "payloadType": "date",
  242.         "repeat": "",
  243.         "crontab": "00 06 * * *",
  244.         "once": false,
  245.         "onceDelay": 0.1,
  246.         "x": 90,
  247.         "y": 40,
  248.         "wires": [
  249.             [
  250.                 "6b7d413a.b9817"
  251.             ]
  252.         ]
  253.     },
  254.     {
  255.         "id": "e2fecdcf.9a5ec",
  256.         "type": "function",
  257.         "z": "94604175.00524",
  258.         "name": "Increment brightness",
  259.         "func": "brightness = (context.get("brightness") || 15) + 1;nmsg.brightness = Math.min(255, brightness);nnode.status({text: msg.brightness});ncontext.set("brightness", brightness);nreturn msg;",
  260.         "outputs": 1,
  261.         "noerr": 0,
  262.         "x": 520,
  263.         "y": 160,
  264.         "wires": [
  265.             [
  266.                 "b8d63647.695518",
  267.                 "76494d08.3ab6a4",
  268.                 "b83f6b7b.666e08"
  269.             ]
  270.         ]
  271.     },
  272.     {
  273.         "id": "604605d9.b5076c",
  274.         "type": "delay",
  275.         "z": "94604175.00524",
  276.         "name": "",
  277.         "pauseType": "delay",
  278.         "timeout": "1",
  279.         "timeoutUnits": "seconds",
  280.         "rate": "1",
  281.         "nbRateUnits": "1",
  282.         "rateUnits": "second",
  283.         "randomFirst": "1",
  284.         "randomLast": "5",
  285.         "randomUnits": "seconds",
  286.         "drop": false,
  287.         "x": 780,
  288.         "y": 120,
  289.         "wires": [
  290.             [
  291.                 "928d0136.507c6",
  292.                 "1dfed425.fc6f4c"
  293.             ]
  294.         ]
  295.     },
  296.     {
  297.         "id": "1dfed425.fc6f4c",
  298.         "type": "api-call-service",
  299.         "z": "94604175.00524",
  300.         "name": "Kitchen | Overhead",
  301.         "server": "2451a35b.d6669c",
  302.         "service_domain": "homeassistant",
  303.         "service": "turn_on",
  304.         "data": "{"entity_id":"light.caseta_r_wireless_in_wall_dimmer_7","brightness":"{{brightness}}"}",
  305.         "mergecontext": "",
  306.         "output_location": "",
  307.         "output_location_type": "none",
  308.         "mustacheAltTags": false,
  309.         "x": 890,
  310.         "y": 80,
  311.         "wires": [
  312.             [
  313.                 "4406ac1d.da7904"
  314.             ]
  315.         ]
  316.     },
  317.     {
  318.         "id": "2451a35b.d6669c",
  319.         "type": "server",
  320.         "z": "",
  321.         "name": "Home Assistant"
  322.     }
  323. ]