i'm using homeassistant and node red.
i used a get-entities node to get an array of windows/doors left open.
i'm trying to create a function node that counts the array length and join the friendly name attributes into a string. if anyone could help, thanks so much.
var count = msg.payload.length
var array = join(payload.attributes.friendly_name, ", ")
return [count, array];