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;
I have some context there and it reports the state but it is still undefined in the debug menu. Although as you can see in the context menu there is a value.
Now that I typed that message I saw my error. In the function I wrote homeassistant.homeAssistant, but as you can see in the context menu it's homeassistant.hA.