Advertisement
Guest User

Untitled

a guest
Jan 4th, 2022
162
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
JSON 5.79 KB | None | 0 0
  1. [
  2.     {
  3.         "id": "8c83dd0e22a9a4df",
  4.         "type": "debug",
  5.         "z": "27247b38d1a04870",
  6.         "name": "",
  7.         "active": true,
  8.         "tosidebar": true,
  9.         "console": false,
  10.         "tostatus": false,
  11.         "complete": "false",
  12.         "statusVal": "",
  13.         "statusType": "auto",
  14.         "x": 1250,
  15.         "y": 200,
  16.         "wires": []
  17.     },
  18.     {
  19.         "id": "b84de426d9b009e6",
  20.         "type": "inject",
  21.         "z": "27247b38d1a04870",
  22.         "name": "",
  23.         "props": [
  24.             {
  25.                 "p": "payload"
  26.             },
  27.             {
  28.                 "p": "topic",
  29.                 "vt": "str"
  30.             }
  31.         ],
  32.         "repeat": "",
  33.         "crontab": "",
  34.         "once": false,
  35.         "onceDelay": 0.1,
  36.         "topic": "",
  37.         "payload": "",
  38.         "payloadType": "date",
  39.         "x": 180,
  40.         "y": 200,
  41.         "wires": [
  42.             [
  43.                 "71868977.626ca8"
  44.             ]
  45.         ]
  46.     },
  47.     {
  48.         "id": "524aa7a0283978f7",
  49.         "type": "http request",
  50.         "z": "27247b38d1a04870",
  51.         "name": "",
  52.         "method": "use",
  53.         "ret": "obj",
  54.         "paytoqs": "ignore",
  55.         "url": "",
  56.         "tls": "",
  57.         "persist": false,
  58.         "proxy": "",
  59.         "authType": "",
  60.         "senderr": false,
  61.         "x": 890,
  62.         "y": 200,
  63.         "wires": [
  64.             [
  65.                 "7793a5da9e85f825"
  66.             ]
  67.         ]
  68.     },
  69.     {
  70.         "id": "2622c977b04551dd",
  71.         "type": "function",
  72.         "z": "27247b38d1a04870",
  73.         "name": "",
  74.         "func": "msg.url = \"https://energy-insights.tado.com/api/homes/{home_id}/consumption\"\nmsg.method = \"GET\"\n\nmsg.headers = {\n    Authorization: \"Bearer \"+ msg.payload.access_token\n}\n\nreturn msg;",
  75.         "outputs": 1,
  76.         "noerr": 0,
  77.         "initialize": "",
  78.         "finalize": "",
  79.         "libs": [],
  80.         "x": 720,
  81.         "y": 200,
  82.         "wires": [
  83.             [
  84.                 "524aa7a0283978f7"
  85.             ]
  86.         ]
  87.     },
  88.     {
  89.         "id": "7793a5da9e85f825",
  90.         "type": "ha-entity",
  91.         "z": "27247b38d1a04870",
  92.         "name": "",
  93.         "server": "2f1dabb5.cf58e4",
  94.         "version": 2,
  95.         "debugenabled": false,
  96.         "outputs": 1,
  97.         "entityType": "sensor",
  98.         "config": [
  99.             {
  100.                 "property": "name",
  101.                 "value": "gas_consuming_tado"
  102.             },
  103.             {
  104.                 "property": "device_class",
  105.                 "value": "gas"
  106.             },
  107.             {
  108.                 "property": "icon",
  109.                 "value": "mdi:fire"
  110.             },
  111.             {
  112.                 "property": "unit_of_measurement",
  113.                 "value": "m³"
  114.             },
  115.             {
  116.                 "property": "state_class",
  117.                 "value": "total_increasing"
  118.             },
  119.             {
  120.                 "property": "last_reset",
  121.                 "value": ""
  122.             }
  123.         ],
  124.         "state": "payload.infos.current.consumed.m3",
  125.         "stateType": "msg",
  126.         "attributes": [],
  127.         "resend": true,
  128.         "outputLocation": "payload",
  129.         "outputLocationType": "none",
  130.         "inputOverride": "allow",
  131.         "outputOnStateChange": false,
  132.         "outputPayload": "$entity().state ? \"on\": \"off\"",
  133.         "outputPayloadType": "jsonata",
  134.         "x": 1070,
  135.         "y": 200,
  136.         "wires": [
  137.             [
  138.                 "8c83dd0e22a9a4df"
  139.             ]
  140.         ]
  141.     },
  142.     {
  143.         "id": "71868977.626ca8",
  144.         "type": "change",
  145.         "z": "27247b38d1a04870",
  146.         "name": "",
  147.         "rules": [
  148.             {
  149.                 "t": "set",
  150.                 "p": "url",
  151.                 "pt": "msg",
  152.                 "to": "https://auth.tado.com/oauth/token",
  153.                 "tot": "str"
  154.             },
  155.             {
  156.                 "t": "set",
  157.                 "p": "payload",
  158.                 "pt": "msg",
  159.                 "to": "{\"client_id\":\"tado-web-app\",\"grant_type\":\"password\",\"scope\":\"home.user\",\"username\":\"email\",\"password\":\"password\",\"client_secret\":\"wZaRN7rpjn3FoNyF5IFuxg9uMzYJcvOoQ8QWiIqS3hfk6gLhVlG57j5YNoZL2Rtc\"}",
  160.                 "tot": "json"
  161.             },
  162.             {
  163.                 "t": "set",
  164.                 "p": "headers",
  165.                 "pt": "msg",
  166.                 "to": "{\"content-type\":\"application/x-www-form-urlencoded\"}",
  167.                 "tot": "json"
  168.             },
  169.             {
  170.                 "t": "set",
  171.                 "p": "method",
  172.                 "pt": "msg",
  173.                 "to": "POST",
  174.                 "tot": "str"
  175.             }
  176.         ],
  177.         "action": "",
  178.         "property": "",
  179.         "from": "",
  180.         "to": "",
  181.         "reg": false,
  182.         "x": 360,
  183.         "y": 200,
  184.         "wires": [
  185.             [
  186.                 "3ffaed957aa187b4"
  187.             ]
  188.         ]
  189.     },
  190.     {
  191.         "id": "3ffaed957aa187b4",
  192.         "type": "http request",
  193.         "z": "27247b38d1a04870",
  194.         "name": "",
  195.         "method": "use",
  196.         "ret": "obj",
  197.         "paytoqs": "ignore",
  198.         "url": "",
  199.         "tls": "",
  200.         "persist": false,
  201.         "proxy": "",
  202.         "authType": "",
  203.         "senderr": false,
  204.         "x": 550,
  205.         "y": 200,
  206.         "wires": [
  207.             [
  208.                 "2622c977b04551dd"
  209.             ]
  210.         ]
  211.     },
  212.     {
  213.         "id": "2f1dabb5.cf58e4",
  214.         "type": "server",
  215.         "name": "Home Assistant",
  216.         "version": 2,
  217.         "addon": false,
  218.         "rejectUnauthorizedCerts": true,
  219.         "ha_boolean": "y|yes|true|on|home|open",
  220.         "connectionDelay": true,
  221.         "cacheJson": true,
  222.         "heartbeat": false,
  223.         "heartbeatInterval": 30
  224.     }
  225. ]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement