Ahh don’t you hate it when real life gets in the way!
One addition that I just stumbled across tonight. When you are saving the appId and appName, they can come in with non-breaking spaces, which causes issues if you are later trying to compare with values typed in Home Remote that have a regular space. So, I modified the block of code to look like this:
//Need to replace nbsp with a regular space
var re = new RegExp(String.fromCharCode(160), "g");
apps = {};
appsElement.elements.forEach(function (node) {
var appId = node.attributes.id.replace(re, " ");
var appName = node.text.replace(re, " ");
apps[appName] = appId;
});
Hopefully that makes sense. It was a weird issue, where I was trying to use HomeRemote to call a specific input, and it was not working. I ended up using charCodeAt to look at each character to see what was going on. Mystery solved.