This commit is contained in:
Skylar Grant 2024-08-21 22:26:20 -04:00
parent a0b0d16c73
commit 8a68c00f01

View File

@ -148,8 +148,8 @@ module.exports = {
}, },
handlers: { handlers: {
stateChange(change) { stateChange(change) {
gpio.togglePin(pinMap[change.name].board).then(() => { gpio.togglePin(pinMap.get(change.name).board).then(() => {
console.log(`Pin ${config.states[change.name].pin} set to ${change.on}`); console.log(`${change.name} toggled.`);
}).catch(e => console.error(e)); }).catch(e => console.error(e));
} }
} }