node-red-contrib-tesla
Advanced tools
Comparing version 1.0.3 to 1.0.4
{ | ||
"name": "node-red-contrib-tesla", | ||
"version": "1.0.3", | ||
"version": "1.0.4", | ||
"description": "Node red module to control Tesla vehicles and devices", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -139,3 +139,4 @@ module.exports = function (RED) { | ||
email: {type: "text"}, | ||
password: {type: "password"} | ||
password: {type: "password"}, | ||
manualToken: {type: "password"} | ||
} | ||
@@ -157,3 +158,5 @@ }); | ||
const command = msg.command || config.command; | ||
const {email, password} = node.teslaConfig.credentials; | ||
// TODO: Remove manual token when auth flow is fixed in TeslaJs | ||
const {email, password, manualToken} = node.teslaConfig.credentials; | ||
const { commandArgs } = msg; | ||
@@ -165,3 +168,3 @@ if (command === 'remoteStart') { | ||
try { | ||
const authToken = await getToken(email, password); | ||
const authToken = manualToken ? manualToken : await getToken(email, password); | ||
if (command === 'vehicles') { | ||
@@ -168,0 +171,0 @@ msg.payload = await tjs.vehiclesAsync({authToken}); |
Sorry, the diff of this file is not supported yet
30054
8
292