Advertisement
Guest User

Untitled

a guest
Apr 23rd, 2018
129
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
JSON 8.68 KB | None | 0 0
  1. [
  2.     {
  3.         "id": "2fe3cc0e.355e24",
  4.         "type": "switch",
  5.         "z": "37bfc263.794bfe",
  6.         "name": "",
  7.         "property": "payload",
  8.         "propertyType": "msg",
  9.         "rules": [
  10.             {
  11.                 "t": "eq",
  12.                 "v": "on",
  13.                 "vt": "str"
  14.             },
  15.             {
  16.                 "t": "eq",
  17.                 "v": "off",
  18.                 "vt": "str"
  19.             }
  20.         ],
  21.         "checkall": "true",
  22.         "outputs": 2,
  23.         "x": 290,
  24.         "y": 900,
  25.         "wires": [
  26.             [
  27.                 "7009f041.04a2a"
  28.             ],
  29.             []
  30.         ]
  31.     },
  32.     {
  33.         "id": "4f0109b8.0b7a78",
  34.         "type": "server-state-changed",
  35.         "z": "37bfc263.794bfe",
  36.         "name": "Kjøkkenknapp",
  37.         "server": "768a91a6.ea7b8",
  38.         "entityidfilter": "binary_sensor.switch_158d00016d7a5e",
  39.         "haltifstate": "",
  40.         "x": 150,
  41.         "y": 900,
  42.         "wires": [
  43.             [
  44.                 "2fe3cc0e.355e24"
  45.             ]
  46.         ]
  47.     },
  48.     {
  49.         "id": "7009f041.04a2a",
  50.         "type": "api-current-state",
  51.         "z": "37bfc263.794bfe",
  52.         "name": "Vær",
  53.         "server": "768a91a6.ea7b8",
  54.         "halt_if": "",
  55.         "entity_id": "sensor.dark_sky_summary",
  56.         "x": 450,
  57.         "y": 920,
  58.         "wires": [
  59.             [
  60.                 "d4f56576.17dbb8"
  61.             ]
  62.         ]
  63.     },
  64.     {
  65.         "id": "d4f56576.17dbb8",
  66.         "type": "function",
  67.         "z": "37bfc263.794bfe",
  68.         "name": "Lagre",
  69.         "func": "flow.set('weather_message','Det er nå ' +  msg.payload.toLowerCase() + ' ');\nreturn msg;",
  70.         "outputs": 1,
  71.         "noerr": 0,
  72.         "x": 550,
  73.         "y": 840,
  74.         "wires": [
  75.             [
  76.                 "da7092c0.d2414"
  77.             ]
  78.         ]
  79.     },
  80.     {
  81.         "id": "5d026f79.814cc",
  82.         "type": "inject",
  83.         "z": "37bfc263.794bfe",
  84.         "name": "",
  85.         "topic": "",
  86.         "payload": "",
  87.         "payloadType": "date",
  88.         "repeat": "",
  89.         "crontab": "",
  90.         "once": false,
  91.         "onceDelay": 0.1,
  92.         "x": 280,
  93.         "y": 940,
  94.         "wires": [
  95.             [
  96.                 "7009f041.04a2a"
  97.             ]
  98.         ]
  99.     },
  100.     {
  101.         "id": "da7092c0.d2414",
  102.         "type": "api-current-state",
  103.         "z": "37bfc263.794bfe",
  104.         "name": "Utetemp",
  105.         "server": "768a91a6.ea7b8",
  106.         "halt_if": "",
  107.         "entity_id": "sensor.dark_sky_temperature",
  108.         "x": 620,
  109.         "y": 920,
  110.         "wires": [
  111.             [
  112.                 "cc905c73.9100f"
  113.             ]
  114.         ]
  115.     },
  116.     {
  117.         "id": "cc905c73.9100f",
  118.         "type": "function",
  119.         "z": "37bfc263.794bfe",
  120.         "name": "Lagre",
  121.         "func": "flow.set('weather_message',flow.get('weather_message') + 'med ' + Math.round(parseFloat(msg.payload)) + ' grader. ');\nreturn msg;",
  122.         "outputs": 1,
  123.         "noerr": 0,
  124.         "x": 690,
  125.         "y": 840,
  126.         "wires": [
  127.             [
  128.                 "16350341.5596cd"
  129.             ]
  130.         ]
  131.     },
  132.     {
  133.         "id": "16350341.5596cd",
  134.         "type": "api-current-state",
  135.         "z": "37bfc263.794bfe",
  136.         "name": "Værmld",
  137.         "server": "768a91a6.ea7b8",
  138.         "halt_if": "",
  139.         "entity_id": "sensor.dark_sky_hourly_summary",
  140.         "x": 760,
  141.         "y": 920,
  142.         "wires": [
  143.             [
  144.                 "9142393b.e21d08"
  145.             ]
  146.         ]
  147.     },
  148.     {
  149.         "id": "9142393b.e21d08",
  150.         "type": "function",
  151.         "z": "37bfc263.794bfe",
  152.         "name": "Lagre",
  153.         "func": "flow.set('weather_message',flow.get('weather_message') + 'Her er dagens værvarsel: ' + msg.payload + ' ');\nreturn msg;",
  154.         "outputs": 1,
  155.         "noerr": 0,
  156.         "x": 850,
  157.         "y": 840,
  158.         "wires": [
  159.             [
  160.                 "1bbab5b9.f71eda"
  161.             ]
  162.         ]
  163.     },
  164.     {
  165.         "id": "1bbab5b9.f71eda",
  166.         "type": "api-current-state",
  167.         "z": "37bfc263.794bfe",
  168.         "name": "Lavest temp",
  169.         "server": "768a91a6.ea7b8",
  170.         "halt_if": "",
  171.         "entity_id": "sensor.dark_sky_daily_low_temperature",
  172.         "x": 930,
  173.         "y": 920,
  174.         "wires": [
  175.             [
  176.                 "ef58a07a.45c17"
  177.             ]
  178.         ]
  179.     },
  180.     {
  181.         "id": "ef58a07a.45c17",
  182.         "type": "function",
  183.         "z": "37bfc263.794bfe",
  184.         "name": "Lagre",
  185.         "func": "flow.set('weather_message',flow.get('weather_message') + 'Lavest temperatur ' + Math.round(parseFloat(msg.payload)) + ' grader ');\nreturn msg;",
  186.         "outputs": 1,
  187.         "noerr": 0,
  188.         "x": 1030,
  189.         "y": 840,
  190.         "wires": [
  191.             [
  192.                 "31ebb895.e7bff8"
  193.             ]
  194.         ]
  195.     },
  196.     {
  197.         "id": "31ebb895.e7bff8",
  198.         "type": "api-current-state",
  199.         "z": "37bfc263.794bfe",
  200.         "name": "Høy. temp",
  201.         "server": "768a91a6.ea7b8",
  202.         "halt_if": "",
  203.         "entity_id": "sensor.dark_sky_daily_high_temperature",
  204.         "x": 1110,
  205.         "y": 920,
  206.         "wires": [
  207.             [
  208.                 "1ede5db4.10fa42"
  209.             ]
  210.         ]
  211.     },
  212.     {
  213.         "id": "1ede5db4.10fa42",
  214.         "type": "function",
  215.         "z": "37bfc263.794bfe",
  216.         "name": "Lagre",
  217.         "func": "flow.set('weather_message',flow.get('weather_message') + 'og høyest ' + Math.round(parseFloat(msg.payload)) + ' grader. ');\nreturn msg;",
  218.         "outputs": 1,
  219.         "noerr": 0,
  220.         "x": 1210,
  221.         "y": 840,
  222.         "wires": [
  223.             [
  224.                 "a34420b2.2f255"
  225.             ]
  226.         ]
  227.     },
  228.     {
  229.         "id": "a34420b2.2f255",
  230.         "type": "api-current-state",
  231.         "z": "37bfc263.794bfe",
  232.         "name": "Nedbør?",
  233.         "server": "768a91a6.ea7b8",
  234.         "halt_if": "",
  235.         "entity_id": "sensor.dark_sky_precip_probability",
  236.         "x": 1260,
  237.         "y": 920,
  238.         "wires": [
  239.             [
  240.                 "5e25cde2.fe0264"
  241.             ]
  242.         ]
  243.     },
  244.     {
  245.         "id": "5e25cde2.fe0264",
  246.         "type": "function",
  247.         "z": "37bfc263.794bfe",
  248.         "name": "Lagre",
  249.         "func": "flow.set('weather_message',flow.get('weather_message') + 'Det er ' + Math.round(parseFloat(msg.payload)) + ' prosent sjanse for nedbør i dag. ');\nreturn msg;",
  250.         "outputs": 1,
  251.         "noerr": 0,
  252.         "x": 1370,
  253.         "y": 840,
  254.         "wires": [
  255.             [
  256.                 "675f450e.3f258c"
  257.             ]
  258.         ]
  259.     },
  260.     {
  261.         "id": "675f450e.3f258c",
  262.         "type": "change",
  263.         "z": "37bfc263.794bfe",
  264.         "name": "Format",
  265.         "rules": [
  266.             {
  267.                 "t": "set",
  268.                 "p": "payload",
  269.                 "pt": "msg",
  270.                 "to": "{}",
  271.                 "tot": "json"
  272.             },
  273.             {
  274.                 "t": "set",
  275.                 "p": "payload.data",
  276.                 "pt": "msg",
  277.                 "to": "{}",
  278.                 "tot": "json"
  279.             },
  280.             {
  281.                 "t": "set",
  282.                 "p": "payload.data.message",
  283.                 "pt": "msg",
  284.                 "to": "weather_message",
  285.                 "tot": "flow"
  286.             },
  287.             {
  288.                 "t": "set",
  289.                 "p": "payload.data.delay",
  290.                 "pt": "msg",
  291.                 "to": "00:00:20",
  292.                 "tot": "str"
  293.             },
  294.             {
  295.                 "t": "set",
  296.                 "p": "payload.data.volume",
  297.                 "pt": "msg",
  298.                 "to": "0.4",
  299.                 "tot": "str"
  300.             },
  301.             {
  302.                 "t": "set",
  303.                 "p": "payload.data.sonos_entity",
  304.                 "pt": "msg",
  305.                 "to": "media_player.kitchen",
  306.                 "tot": "str"
  307.             }
  308.         ],
  309.         "action": "",
  310.         "property": "",
  311.         "from": "",
  312.         "to": "",
  313.         "reg": false,
  314.         "x": 1680,
  315.         "y": 920,
  316.         "wires": [
  317.             [
  318.                 "a63230b8.1b2d7"
  319.             ]
  320.         ]
  321.     },
  322.     {
  323.         "id": "a63230b8.1b2d7",
  324.         "type": "api-call-service",
  325.         "z": "37bfc263.794bfe",
  326.         "name": "Sonos say",
  327.         "server": "768a91a6.ea7b8",
  328.         "service_domain": "script",
  329.         "service": "sonos_say",
  330.         "data": "{}",
  331.         "x": 1830,
  332.         "y": 920,
  333.         "wires": [
  334.             []
  335.         ]
  336.     },
  337.     {
  338.         "id": "768a91a6.ea7b8",
  339.         "type": "server",
  340.         "z": "",
  341.         "name": "Home Assistant",
  342.         "url": "https://myhaserver:8123",
  343.         "pass": "my pass"
  344.     }
  345. ]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement