Use event.pin.name instead of polling pin states