Hi,
I am trying to read the value of an input_text from homeassistant. The value my function node is returning is "undefined".
var temp1 = global.get("homeassistant.homeAssistant.states['input_text.temp_1'].state");
var newMsg = { payload: temp1};
return newMsg;
I have tried another method:
var states = global.get('homeassistant.homeAssistant.states');
var temp1 = states["input_text.temp_1"].state;
var newMsg = {payload: temp1};
return newMsg;
However this just gives me this error:



