Advertisement
Guest User

Node-RED light-scheduler example

a guest
Jul 14th, 2021
202
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
JSON 6.84 KB | None | 0 0
  1. [
  2.     {
  3.         "id": "1d6e6711.45a469",
  4.         "type": "tab",
  5.         "label": "Flow 2",
  6.         "disabled": false,
  7.         "info": ""
  8.     },
  9.     {
  10.         "id": "fae8530f.a74e",
  11.         "type": "light-scheduler",
  12.         "z": "1d6e6711.45a469",
  13.         "settings": "3c59b52c.740f9a",
  14.         "events": "[{\"start\":{\"dow\":1,\"mod\":420},\"end\":{\"dow\":1,\"mod\":1320}},{\"start\":{\"dow\":2,\"mod\":420},\"end\":{\"dow\":2,\"mod\":1320}},{\"start\":{\"dow\":3,\"mod\":420},\"end\":{\"dow\":3,\"mod\":1320}},{\"start\":{\"dow\":4,\"mod\":420},\"end\":{\"dow\":4,\"mod\":1320}},{\"start\":{\"dow\":5,\"mod\":420},\"end\":{\"dow\":5,\"mod\":1320}},{\"start\":{\"dow\":6,\"mod\":420},\"end\":{\"dow\":6,\"mod\":1320}},{\"start\":{\"dow\":0,\"mod\":420},\"end\":{\"dow\":0,\"mod\":1320}}]",
  15.         "topic": "",
  16.         "name": "Sleeptime",
  17.         "onPayload": "on",
  18.         "onPayloadType": "str",
  19.         "offPayload": "off",
  20.         "offPayloadType": "str",
  21.         "onlyWhenDark": false,
  22.         "scheduleRndMax": "",
  23.         "sunElevationThreshold": 6,
  24.         "sunShowElevationInStatus": false,
  25.         "outputfreq": "output.statechange",
  26.         "x": 140,
  27.         "y": 160,
  28.         "wires": [
  29.             [
  30.                 "890d8e73.f3fab"
  31.             ]
  32.         ]
  33.     },
  34.     {
  35.         "id": "890d8e73.f3fab",
  36.         "type": "switch",
  37.         "z": "1d6e6711.45a469",
  38.         "name": "",
  39.         "property": "payload",
  40.         "propertyType": "msg",
  41.         "rules": [
  42.             {
  43.                 "t": "eq",
  44.                 "v": "on",
  45.                 "vt": "str"
  46.             },
  47.             {
  48.                 "t": "eq",
  49.                 "v": "off",
  50.                 "vt": "str"
  51.             }
  52.         ],
  53.         "checkall": "true",
  54.         "repair": false,
  55.         "outputs": 2,
  56.         "x": 265,
  57.         "y": 160,
  58.         "wires": [
  59.             [
  60.                 "e51929bd.353388"
  61.             ],
  62.             [
  63.                 "77cff2c6.5ff56c"
  64.             ]
  65.         ],
  66.         "l": false
  67.     },
  68.     {
  69.         "id": "cba92170.cde29",
  70.         "type": "comment",
  71.         "z": "1d6e6711.45a469",
  72.         "name": "Установка принятых периодов сна и бодрствования",
  73.         "info": "",
  74.         "x": 260,
  75.         "y": 80,
  76.         "wires": []
  77.     },
  78.     {
  79.         "id": "f03d3365.433cd",
  80.         "type": "api-call-service",
  81.         "z": "1d6e6711.45a469",
  82.         "name": "HA",
  83.         "server": "b9490f48.586ed",
  84.         "version": 3,
  85.         "debugenabled": false,
  86.         "service_domain": "",
  87.         "service": "",
  88.         "entityId": "",
  89.         "data": "",
  90.         "dataType": "json",
  91.         "mergecontext": "",
  92.         "mustacheAltTags": false,
  93.         "outputProperties": [
  94.             {
  95.                 "property": "payload",
  96.                 "propertyType": "msg",
  97.                 "value": "",
  98.                 "valueType": "data"
  99.             }
  100.         ],
  101.         "queue": "none",
  102.         "x": 515,
  103.         "y": 160,
  104.         "wires": [
  105.             []
  106.         ],
  107.         "l": false
  108.     },
  109.     {
  110.         "id": "e51929bd.353388",
  111.         "type": "template",
  112.         "z": "1d6e6711.45a469",
  113.         "name": "Daytime",
  114.         "field": "payload",
  115.         "fieldType": "msg",
  116.         "format": "handlebars",
  117.         "syntax": "mustache",
  118.         "template": "{\n    \"domain\": \"input_select\",\n    \"service\": \"select_option\",\n    \"data\": {\n        \"entity_id\": \"input_select.house_mode\",\n        \"option\": \"Daytime\"\n    }\n}",
  119.         "output": "str",
  120.         "x": 400,
  121.         "y": 140,
  122.         "wires": [
  123.             [
  124.                 "f03d3365.433cd"
  125.             ]
  126.         ]
  127.     },
  128.     {
  129.         "id": "77cff2c6.5ff56c",
  130.         "type": "template",
  131.         "z": "1d6e6711.45a469",
  132.         "name": "Sleeping",
  133.         "field": "payload",
  134.         "fieldType": "msg",
  135.         "format": "handlebars",
  136.         "syntax": "mustache",
  137.         "template": "{\n    \"domain\": \"input_select\",\n    \"service\": \"select_option\",\n    \"data\": {\n        \"entity_id\": \"input_select.house_mode\",\n        \"option\": \"Sleeping\"\n    }\n}",
  138.         "output": "str",
  139.         "x": 400,
  140.         "y": 180,
  141.         "wires": [
  142.             [
  143.                 "f03d3365.433cd"
  144.             ]
  145.         ]
  146.     },
  147.     {
  148.         "id": "706faac6.dd4fa4",
  149.         "type": "api-current-state",
  150.         "z": "1d6e6711.45a469",
  151.         "name": "Режим дня",
  152.         "server": "b9490f48.586ed",
  153.         "version": 2,
  154.         "outputs": 2,
  155.         "halt_if": "Daytime",
  156.         "halt_if_type": "str",
  157.         "halt_if_compare": "is",
  158.         "entity_id": "input_select.house_mode",
  159.         "state_type": "str",
  160.         "blockInputOverrides": false,
  161.         "outputProperties": [
  162.             {
  163.                 "property": "payload",
  164.                 "propertyType": "msg",
  165.                 "value": "",
  166.                 "valueType": "entityState"
  167.             },
  168.             {
  169.                 "property": "data",
  170.                 "propertyType": "msg",
  171.                 "value": "",
  172.                 "valueType": "entity"
  173.             }
  174.         ],
  175.         "x": 310,
  176.         "y": 380,
  177.         "wires": [
  178.             [
  179.                 "29925994.930c96"
  180.             ],
  181.             [
  182.                 "52b60c4c.dc7334"
  183.             ]
  184.         ],
  185.         "outputLabels": [
  186.             "Daytime",
  187.             "Sleeping"
  188.         ],
  189.         "icon": "node-red-contrib-eztimer/datetime.png"
  190.     },
  191.     {
  192.         "id": "bd7f9dfd.4643a",
  193.         "type": "inject",
  194.         "z": "1d6e6711.45a469",
  195.         "name": "",
  196.         "props": [
  197.             {
  198.                 "p": "payload"
  199.             },
  200.             {
  201.                 "p": "topic",
  202.                 "vt": "str"
  203.             }
  204.         ],
  205.         "repeat": "",
  206.         "crontab": "",
  207.         "once": false,
  208.         "onceDelay": 0.1,
  209.         "topic": "",
  210.         "payload": "",
  211.         "payloadType": "date",
  212.         "x": 140,
  213.         "y": 380,
  214.         "wires": [
  215.             [
  216.                 "706faac6.dd4fa4"
  217.             ]
  218.         ]
  219.     },
  220.     {
  221.         "id": "29925994.930c96",
  222.         "type": "debug",
  223.         "z": "1d6e6711.45a469",
  224.         "name": "",
  225.         "active": true,
  226.         "tosidebar": true,
  227.         "console": false,
  228.         "tostatus": false,
  229.         "complete": "false",
  230.         "statusVal": "",
  231.         "statusType": "auto",
  232.         "x": 490,
  233.         "y": 360,
  234.         "wires": []
  235.     },
  236.     {
  237.         "id": "52b60c4c.dc7334",
  238.         "type": "debug",
  239.         "z": "1d6e6711.45a469",
  240.         "name": "",
  241.         "active": true,
  242.         "tosidebar": true,
  243.         "console": false,
  244.         "tostatus": false,
  245.         "complete": "false",
  246.         "statusVal": "",
  247.         "statusType": "auto",
  248.         "x": 490,
  249.         "y": 400,
  250.         "wires": []
  251.     }
  252. ]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement