Im trying to pass a returned variable from pageFunctions via webhooks, but I cannot get the value. My code: async function pageFunction(context) { await context.skipLinks(); const $ = context.jQuery; const pageTitle = $('title').first().text(); const matches = pageTitle.match(/((\d+))/); const numberOfTests = 0;
if (matches !== null) { numberOfTests = parseInt(matches[1]); } context.log.info(${numberOfTests})
Im just trying to scrape a website behind a login (that I've managed to acheive) to see if there is something available, and pass this boolean variable via a webhook to my Home Assistant