From 8a68c00f012283358959f9d6568b913817bcf8e5 Mon Sep 17 00:00:00 2001 From: Skylar Grant Date: Wed, 21 Aug 2024 22:26:20 -0400 Subject: [PATCH] idk --- src/custom_modules/functions.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/custom_modules/functions.js b/src/custom_modules/functions.js index b620dd3..0e3fc87 100644 --- a/src/custom_modules/functions.js +++ b/src/custom_modules/functions.js @@ -148,8 +148,8 @@ module.exports = { }, handlers: { stateChange(change) { - gpio.togglePin(pinMap[change.name].board).then(() => { - console.log(`Pin ${config.states[change.name].pin} set to ${change.on}`); + gpio.togglePin(pinMap.get(change.name).board).then(() => { + console.log(`${change.name} toggled.`); }).catch(e => console.error(e)); } }