Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [
- {
- "id": "8c83dd0e22a9a4df",
- "type": "debug",
- "z": "27247b38d1a04870",
- "name": "",
- "active": true,
- "tosidebar": true,
- "console": false,
- "tostatus": false,
- "complete": "false",
- "statusVal": "",
- "statusType": "auto",
- "x": 1250,
- "y": 200,
- "wires": []
- },
- {
- "id": "b84de426d9b009e6",
- "type": "inject",
- "z": "27247b38d1a04870",
- "name": "",
- "props": [
- {
- "p": "payload"
- },
- {
- "p": "topic",
- "vt": "str"
- }
- ],
- "repeat": "",
- "crontab": "",
- "once": false,
- "onceDelay": 0.1,
- "topic": "",
- "payload": "",
- "payloadType": "date",
- "x": 180,
- "y": 200,
- "wires": [
- [
- "71868977.626ca8"
- ]
- ]
- },
- {
- "id": "524aa7a0283978f7",
- "type": "http request",
- "z": "27247b38d1a04870",
- "name": "",
- "method": "use",
- "ret": "obj",
- "paytoqs": "ignore",
- "url": "",
- "tls": "",
- "persist": false,
- "proxy": "",
- "authType": "",
- "senderr": false,
- "x": 890,
- "y": 200,
- "wires": [
- [
- "7793a5da9e85f825"
- ]
- ]
- },
- {
- "id": "2622c977b04551dd",
- "type": "function",
- "z": "27247b38d1a04870",
- "name": "",
- "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;",
- "outputs": 1,
- "noerr": 0,
- "initialize": "",
- "finalize": "",
- "libs": [],
- "x": 720,
- "y": 200,
- "wires": [
- [
- "524aa7a0283978f7"
- ]
- ]
- },
- {
- "id": "7793a5da9e85f825",
- "type": "ha-entity",
- "z": "27247b38d1a04870",
- "name": "",
- "server": "2f1dabb5.cf58e4",
- "version": 2,
- "debugenabled": false,
- "outputs": 1,
- "entityType": "sensor",
- "config": [
- {
- "property": "name",
- "value": "gas_consuming_tado"
- },
- {
- "property": "device_class",
- "value": "gas"
- },
- {
- "property": "icon",
- "value": "mdi:fire"
- },
- {
- "property": "unit_of_measurement",
- "value": "m³"
- },
- {
- "property": "state_class",
- "value": "total_increasing"
- },
- {
- "property": "last_reset",
- "value": ""
- }
- ],
- "state": "payload.infos.current.consumed.m3",
- "stateType": "msg",
- "attributes": [],
- "resend": true,
- "outputLocation": "payload",
- "outputLocationType": "none",
- "inputOverride": "allow",
- "outputOnStateChange": false,
- "outputPayload": "$entity().state ? \"on\": \"off\"",
- "outputPayloadType": "jsonata",
- "x": 1070,
- "y": 200,
- "wires": [
- [
- "8c83dd0e22a9a4df"
- ]
- ]
- },
- {
- "id": "71868977.626ca8",
- "type": "change",
- "z": "27247b38d1a04870",
- "name": "",
- "rules": [
- {
- "t": "set",
- "p": "url",
- "pt": "msg",
- "to": "https://auth.tado.com/oauth/token",
- "tot": "str"
- },
- {
- "t": "set",
- "p": "payload",
- "pt": "msg",
- "to": "{\"client_id\":\"tado-web-app\",\"grant_type\":\"password\",\"scope\":\"home.user\",\"username\":\"email\",\"password\":\"password\",\"client_secret\":\"wZaRN7rpjn3FoNyF5IFuxg9uMzYJcvOoQ8QWiIqS3hfk6gLhVlG57j5YNoZL2Rtc\"}",
- "tot": "json"
- },
- {
- "t": "set",
- "p": "headers",
- "pt": "msg",
- "to": "{\"content-type\":\"application/x-www-form-urlencoded\"}",
- "tot": "json"
- },
- {
- "t": "set",
- "p": "method",
- "pt": "msg",
- "to": "POST",
- "tot": "str"
- }
- ],
- "action": "",
- "property": "",
- "from": "",
- "to": "",
- "reg": false,
- "x": 360,
- "y": 200,
- "wires": [
- [
- "3ffaed957aa187b4"
- ]
- ]
- },
- {
- "id": "3ffaed957aa187b4",
- "type": "http request",
- "z": "27247b38d1a04870",
- "name": "",
- "method": "use",
- "ret": "obj",
- "paytoqs": "ignore",
- "url": "",
- "tls": "",
- "persist": false,
- "proxy": "",
- "authType": "",
- "senderr": false,
- "x": 550,
- "y": 200,
- "wires": [
- [
- "2622c977b04551dd"
- ]
- ]
- },
- {
- "id": "2f1dabb5.cf58e4",
- "type": "server",
- "name": "Home Assistant",
- "version": 2,
- "addon": false,
- "rejectUnauthorizedCerts": true,
- "ha_boolean": "y|yes|true|on|home|open",
- "connectionDelay": true,
- "cacheJson": true,
- "heartbeat": false,
- "heartbeatInterval": 30
- }
- ]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement