I am using the following code for a “function”, code has worked earlier but has now stopped to work:
var lat1 = global.get('homeassistant.HomeAssistantFRL.states["device_tracker.franks_iphone_13"].attributes.latitude');
msg.payload = lat1;
return msg;
But this returns “undefinded”.
I have also tried with:
msg.payload = lat1;
return msg;
This also returns “undefined”.
It seems like the syntax has changed.
Any idea what is wrong?